Skip to content

Instantly share code, notes, and snippets.

@bjornars
Created July 27, 2012 08:53
Show Gist options
  • Save bjornars/3186905 to your computer and use it in GitHub Desktop.
Save bjornars/3186905 to your computer and use it in GitHub Desktop.
cache_mtime = os.stat(cache_path).st_mtime
if ext == '.scss':
scss_files = glob.glob(src_path.rsplit('/', 1)[0] + '/*.scss')
if all(cache_mtime >= os.stat(each).st_mtime for each in scss_files):
return StaticFile(handler.mime, open(cache_path).read())
else:
if cache_mtime >= os.stat(src_path).st_mtime:
return StaticFile(handler.mime, open(cache_path).read())
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment