Skip to content

Instantly share code, notes, and snippets.

@waprin
Created March 29, 2016 05:05
Show Gist options
  • Save waprin/f2d771e44e35c1627d69 to your computer and use it in GitHub Desktop.
Save waprin/f2d771e44e35c1627d69 to your computer and use it in GitHub Desktop.
CACHES = {
‘default’: {
‘BACKEND’: ‘redis_cache.RedisCache’,
‘LOCATION’: [
‘%s:%s’ % (os.getenv(‘REDIS_MASTER_SERVICE_HOST’, ‘127.0.0.1’),
os.getenv(‘REDIS_MASTER_SERVICE_PORT’, 6379)),
‘%s:%s’ % (os.getenv(‘REDIS_SLAVE_SERVICE_HOST’, ‘127.0.0.1’),
os.getenv(‘REDIS_SLAVE_SERVICE_PORT’, 6379))
],
‘OPTIONS’: {
‘PARSER_CLASS’: ‘redis.connection.HiredisParser’,
‘PICKLE_VERSION’: 2,
‘MASTER_CACHE’: ‘%s:%s’ % (
os.getenv(‘REDIS_MASTER_SERVICE_HOST’, ‘127.0.0.1’)
, os.getenv(‘REDIS_MASTER_SERVICE_PORT’, 6379))
},
},
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment