Closed vstoykov closed 7 years ago
@matthewwithanm What you think about this change?
Instead of doing this:
CACHES = {
'default': {
'BACKEND': 'django.core.cache.backends.memcached.MemcachedCache',
'LOCATION': '127.0.0.1:11211',
},
'imagkit': {
'BACKEND': 'django.core.cache.backends.memcached.MemcachedCache',
'LOCATION': '127.0.0.1:11211',
'TIMEOUT': 7 * 24 * 60 * 60, # One week
},
}
IMAGEKIT_CACHE_BACKEND = 'imagkit'
you can simply do
CACHES = {
'default': {
'BACKEND': 'django.core.cache.backends.memcached.MemcachedCache',
'LOCATION': '127.0.0.1:11211',
},
}
IMAGEKIT_CACHE_TIMEOUT = 7 * 24 * 60 * 60 # One week
Also by default it will cache "forever" there will be 1 day cache timeout if DEBUG = False
which is kind of sane default.
Or probably I need to check what is the timeout defined in the backend and if there is none then to set 1 day.
Use 1 day cacheCache "forever" by default when in productionDEBUG = False
to large valuesby settingIMAGEKIT_CACHE_TIMEOUT
Fixed #399 #402