mirror of
https://git.linux-kernel.at/oliver/ivatar.git
synced 2025-11-11 18:56:23 +00:00
Enable memcache caching
This commit is contained in:
13
config.py
13
config.py
@@ -28,10 +28,14 @@ INSTALLED_APPS.extend([
|
||||
|
||||
MIDDLEWARE.extend([
|
||||
'django.middleware.locale.LocaleMiddleware',
|
||||
'django.middleware.cache.FetchFromCacheMiddleware',
|
||||
])
|
||||
MIDDLEWARE.insert(
|
||||
0, 'ivatar.middleware.MultipleProxyMiddleware',
|
||||
)
|
||||
MIDDLEWARE.insert(
|
||||
1, 'django.middleware.cache.UpdateCacheMiddleware',
|
||||
)
|
||||
|
||||
AUTHENTICATION_BACKENDS = (
|
||||
# Enable this to allow LDAP authentication.
|
||||
@@ -175,3 +179,12 @@ MESSAGE_TAGS = {
|
||||
message_constants.WARNING: 'warning',
|
||||
message_constants.ERROR: 'danger',
|
||||
}
|
||||
|
||||
CACHES = {
|
||||
'default': {
|
||||
'BACKEND': 'django.core.cache.backends.memcached.MemcachedCache',
|
||||
'LOCATION': [
|
||||
'127.0.0.1:11211',
|
||||
],
|
||||
}
|
||||
}
|
||||
|
||||
@@ -35,3 +35,4 @@ notsetuptools
|
||||
git+https://github.com/ofalk/monsterid.git
|
||||
git+https://github.com/azaghal/pydenticon.git
|
||||
git+https://github.com/ofalk/Robohash.git@devel
|
||||
python-memcached
|
||||
|
||||
Reference in New Issue
Block a user