upgrade to latest dynamic_preferences and use redis as cache even locally
This commit is contained in:
parent
897d417a6f
commit
6172c0beac
|
@ -260,6 +260,18 @@ BROKER_URL = env("CELERY_BROKER_URL", default='django://')
|
||||||
########## END CELERY
|
########## END CELERY
|
||||||
|
|
||||||
|
|
||||||
|
CACHES = {
|
||||||
|
"default": {
|
||||||
|
"BACKEND": "django_redis.cache.RedisCache",
|
||||||
|
"LOCATION": "{0}/{1}".format(env.cache_url('REDIS_URL', default="redis://127.0.0.1:6379"), 0),
|
||||||
|
"OPTIONS": {
|
||||||
|
"CLIENT_CLASS": "django_redis.client.DefaultClient",
|
||||||
|
"IGNORE_EXCEPTIONS": True, # mimics memcache behavior.
|
||||||
|
# http://niwinz.github.io/django-redis/latest/#_memcached_exceptions_behavior
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
# Location of root django.contrib.admin URL, use {% url 'admin:index' %}
|
# Location of root django.contrib.admin URL, use {% url 'admin:index' %}
|
||||||
ADMIN_URL = r'^admin/'
|
ADMIN_URL = r'^admin/'
|
||||||
# Your common stuff: Below this line define 3rd party library settings
|
# Your common stuff: Below this line define 3rd party library settings
|
||||||
|
|
|
@ -28,14 +28,6 @@ EMAIL_PORT = 1025
|
||||||
EMAIL_BACKEND = env('DJANGO_EMAIL_BACKEND',
|
EMAIL_BACKEND = env('DJANGO_EMAIL_BACKEND',
|
||||||
default='django.core.mail.backends.console.EmailBackend')
|
default='django.core.mail.backends.console.EmailBackend')
|
||||||
|
|
||||||
# CACHING
|
|
||||||
# ------------------------------------------------------------------------------
|
|
||||||
CACHES = {
|
|
||||||
'default': {
|
|
||||||
'BACKEND': 'django.core.cache.backends.locmem.LocMemCache',
|
|
||||||
'LOCATION': ''
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
# django-debug-toolbar
|
# django-debug-toolbar
|
||||||
# ------------------------------------------------------------------------------
|
# ------------------------------------------------------------------------------
|
||||||
|
|
|
@ -100,17 +100,7 @@ DATABASES['default'] = env.db("DATABASE_URL")
|
||||||
# CACHING
|
# CACHING
|
||||||
# ------------------------------------------------------------------------------
|
# ------------------------------------------------------------------------------
|
||||||
# Heroku URL does not pass the DB number, so we parse it in
|
# Heroku URL does not pass the DB number, so we parse it in
|
||||||
CACHES = {
|
|
||||||
"default": {
|
|
||||||
"BACKEND": "django_redis.cache.RedisCache",
|
|
||||||
"LOCATION": "{0}/{1}".format(env.cache_url('REDIS_URL', default="redis://127.0.0.1:6379"), 0),
|
|
||||||
"OPTIONS": {
|
|
||||||
"CLIENT_CLASS": "django_redis.client.DefaultClient",
|
|
||||||
"IGNORE_EXCEPTIONS": True, # mimics memcache behavior.
|
|
||||||
# http://niwinz.github.io/django-redis/latest/#_memcached_exceptions_behavior
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
# LOGGING CONFIGURATION
|
# LOGGING CONFIGURATION
|
||||||
|
|
|
@ -55,4 +55,4 @@ mutagen==1.38
|
||||||
# Until this is merged
|
# Until this is merged
|
||||||
git+https://github.com/EliotBerriot/PyMemoize.git@django
|
git+https://github.com/EliotBerriot/PyMemoize.git@django
|
||||||
|
|
||||||
django-dynamic-preferences>=1.2,<1.3
|
django-dynamic-preferences>=1.3,<1.4
|
||||||
|
|
Loading…
Reference in New Issue