Skip to content

Instantly share code, notes, and snippets.

@inlanger
Created April 13, 2012 09:14
Show Gist options
  • Save inlanger/2375356 to your computer and use it in GitHub Desktop.
Save inlanger/2375356 to your computer and use it in GitHub Desktop.
Johnny Cache
# pip install johnny-cache
# add johnny's middleware
MIDDLEWARE_CLASSES = (
'johnny.middleware.LocalStoreClearMiddleware',
'johnny.middleware.QueryCacheMiddleware',
# ...
)
# some johnny settings
CACHES = {
'default' : dict(
BACKEND = 'johnny.backends.memcached.MemcachedCache',
LOCATION = ['127.0.0.1:11211'],
JOHNNY_CACHE = True,
)
}
JOHNNY_MIDDLEWARE_KEY_PREFIX='jc_myproj'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment