mirror of https://github.com/zulip/zulip.git
Use same CACHES/SESSION_ENGINE settings in dev as in prod.
(imported from commit d45ec576bd0a87b9da0c1a7f7e0a002091d728ff)
This commit is contained in:
parent
009d7b8174
commit
edc718951c
|
@ -405,36 +405,27 @@ USING_RABBITMQ = DEPLOYED
|
|||
# This password also appears in servers/configure-rabbitmq
|
||||
RABBITMQ_PASSWORD = 'xxxxxxxxxxxxxxxx'
|
||||
|
||||
# Caching
|
||||
if DEPLOYED:
|
||||
CACHES = {
|
||||
'default': {
|
||||
'BACKEND': 'django.core.cache.backends.memcached.PyLibMCCache',
|
||||
'LOCATION': '127.0.0.1:11211',
|
||||
'TIMEOUT': 3600
|
||||
},
|
||||
}
|
||||
SESSION_ENGINE = "django.contrib.sessions.backends.cached_db"
|
||||
else:
|
||||
CACHES = { 'default': {
|
||||
'BACKEND': 'django.core.cache.backends.locmem.LocMemCache',
|
||||
'LOCATION': 'humbug-default-local-cache',
|
||||
'TIMEOUT': 3600,
|
||||
|
||||
SESSION_ENGINE = "django.contrib.sessions.backends.cached_db"
|
||||
|
||||
CACHES = {
|
||||
'default': {
|
||||
'BACKEND': 'django.core.cache.backends.memcached.PyLibMCCache',
|
||||
'LOCATION': '127.0.0.1:11211',
|
||||
'TIMEOUT': 3600
|
||||
},
|
||||
'database': {
|
||||
'BACKEND': 'django.core.cache.backends.db.DatabaseCache',
|
||||
'LOCATION': 'third_party_api_results',
|
||||
# Basically never timeout. Setting to 0 isn't guaranteed
|
||||
# to work, see https://code.djangoproject.com/ticket/9595
|
||||
'TIMEOUT': 2000000000,
|
||||
'OPTIONS': {
|
||||
'MAX_ENTRIES': 100000
|
||||
}
|
||||
} }
|
||||
CACHES['database'] = {
|
||||
'BACKEND': 'django.core.cache.backends.db.DatabaseCache',
|
||||
'LOCATION': 'third_party_api_results',
|
||||
# Basically never timeout. Setting to 0 isn't guaranteed
|
||||
# to work, see https://code.djangoproject.com/ticket/9595
|
||||
'TIMEOUT': 2000000000,
|
||||
'OPTIONS': {
|
||||
'MAX_ENTRIES': 100000000,
|
||||
'CULL_FREQUENCY': 10,
|
||||
},
|
||||
'MAX_ENTRIES': 100000000,
|
||||
'CULL_FREQUENCY': 10,
|
||||
}
|
||||
},
|
||||
}
|
||||
|
||||
if DEPLOYED:
|
||||
SERVER_LOG_PATH = "/home/humbug/logs/server.log"
|
||||
|
|
|
@ -37,19 +37,13 @@ USING_RABBITMQ = False
|
|||
TUTORIAL_ENABLED = False
|
||||
|
||||
# Disable use of memcached for caching
|
||||
CACHES = {
|
||||
'default': {
|
||||
'BACKEND': 'django.core.cache.backends.memcached.PyLibMCCache',
|
||||
'LOCATION': '127.0.0.1:11211',
|
||||
'TIMEOUT': 3600
|
||||
},
|
||||
'database': {
|
||||
'BACKEND': 'django.core.cache.backends.dummy.DummyCache',
|
||||
'LOCATION': 'humbug-database-test-cache',
|
||||
'TIMEOUT': 3600,
|
||||
'OPTIONS': {
|
||||
'MAX_ENTRIES': 100000
|
||||
},
|
||||
} }
|
||||
CACHES['database'] = {
|
||||
'BACKEND': 'django.core.cache.backends.dummy.DummyCache',
|
||||
'LOCATION': 'humbug-database-test-cache',
|
||||
'TIMEOUT': 3600,
|
||||
'OPTIONS': {
|
||||
'MAX_ENTRIES': 100000
|
||||
}
|
||||
}
|
||||
|
||||
LOGGING['loggers']['humbug.requests']['level'] = 'CRITICAL'
|
||||
|
|
Loading…
Reference in New Issue