Skip to content

Instantly share code, notes, and snippets.

@rasca
Last active December 11, 2015 21:48
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save rasca/4665106 to your computer and use it in GitHub Desktop.
Save rasca/4665106 to your computer and use it in GitHub Desktop.
try:
from django.utils.encoding import smart_str
import uwsgi
def uwsgi_cachekey(key):
return 'django_compressor%s.%s' % (uwsgi.started_on, smart_str(key))
except ImportError:
pass
COMPRESS_CACHEABLE_PRECOMPILERS = ('text/x-scss', )
COMPRESS_CACHE_KEY_FUNCTION = 'adoora.settings_local.uwsgi_cachekey'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment