Skip to content

Commit

Permalink
Merge pull request #72 from liangliangyy/dev
Browse files Browse the repository at this point in the history
修改缓存设置
  • Loading branch information
liangliangyy committed Dec 28, 2017
2 parents e3e53dc + 12e85f9 commit 0828868
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions DjangoBlog/settings.py
Original file line number Diff line number Diff line change
Expand Up @@ -182,22 +182,22 @@
# http缓存时间
CACHE_CONTROL_MAX_AGE = 2592000
# cache setting

CACHES = {
'default': {
'BACKEND': 'django.core.cache.backends.memcached.MemcachedCache',
'TIMEOUT': 10800,
'LOCATION': '127.0.0.1:11211',
'KEY_PREFIX': 'django_test' if TESTING else 'djangoblog',
'TIMEOUT': 60 * 60 * 10
},
'locmemcache': {
'BACKEND': 'django.core.cache.backends.locmem.LocMemCache',
'TIMEOUT': 10800,
'LOCATION': 'unique-snowflake',
}
}
CACHE_MIDDLEWARE_SECONDS = 60 * 60 * 10
CACHE_MIDDLEWARE_KEY_PREFIX = "djangoblog"
CACHE_MIDDLEWARE_ALIAS = 'default'
# CACHE_MIDDLEWARE_SECONDS = 60 * 60 * 10
# CACHE_MIDDLEWARE_KEY_PREFIX = "djangoblog"
# CACHE_MIDDLEWARE_ALIAS = 'default'

# SESSION_ENGINE = "django.contrib.sessions.backends.cache"
# SESSION_CACHE_ALIAS = 'default'
Expand Down

0 comments on commit 0828868

Please sign in to comment.