Merge pull request #65 from MITx/safe-cache-key
Use a key function that is safe for use w/ memcache This is needed for the asset-pipeline. The pipeline has to map a requested asset name ('css/application.css') to a string that encodes the file contents ('css/application.12323423abcf.css'). It caches these associations in memcache. We have the potential for filenames with spaces in them, which memcache can't handle, so we need to escape the cache keys in such a way that memcache can handle them. It puts these in a cache named 'staticfiles' (http://django-staticfiles.readthedocs.org/en/latest/helpers/#cachedstaticfilesstorage). In the future, it may make sense to put that cache onto the filesystem, rather than memcache, but we should do that only after performance testing.
Showing
lib/util/memcache.py
0 → 100644
Please
register
or
sign in
to comment