mirror of
https://git.linux-kernel.at/oliver/ivatar.git
synced 2025-11-12 03:06:24 +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([
|
MIDDLEWARE.extend([
|
||||||
'django.middleware.locale.LocaleMiddleware',
|
'django.middleware.locale.LocaleMiddleware',
|
||||||
|
'django.middleware.cache.FetchFromCacheMiddleware',
|
||||||
])
|
])
|
||||||
MIDDLEWARE.insert(
|
MIDDLEWARE.insert(
|
||||||
0, 'ivatar.middleware.MultipleProxyMiddleware',
|
0, 'ivatar.middleware.MultipleProxyMiddleware',
|
||||||
)
|
)
|
||||||
|
MIDDLEWARE.insert(
|
||||||
|
1, 'django.middleware.cache.UpdateCacheMiddleware',
|
||||||
|
)
|
||||||
|
|
||||||
AUTHENTICATION_BACKENDS = (
|
AUTHENTICATION_BACKENDS = (
|
||||||
# Enable this to allow LDAP authentication.
|
# Enable this to allow LDAP authentication.
|
||||||
@@ -175,3 +179,12 @@ MESSAGE_TAGS = {
|
|||||||
message_constants.WARNING: 'warning',
|
message_constants.WARNING: 'warning',
|
||||||
message_constants.ERROR: 'danger',
|
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/ofalk/monsterid.git
|
||||||
git+https://github.com/azaghal/pydenticon.git
|
git+https://github.com/azaghal/pydenticon.git
|
||||||
git+https://github.com/ofalk/Robohash.git@devel
|
git+https://github.com/ofalk/Robohash.git@devel
|
||||||
|
python-memcached
|
||||||
|
|||||||
Reference in New Issue
Block a user