Merge pull request #2230 from strikaco/throttle

Refactors throttle to use Django caching (partial fix for #2223).
This commit is contained in:
Griatch 2020-10-21 21:02:15 +02:00 committed by GitHub
commit ae05e62beb
4 changed files with 144 additions and 23 deletions

View file

@ -864,6 +864,21 @@ WEBCLIENT_OPTIONS = {
# messages
}
# Django cache settings
# https://docs.djangoproject.com/en/dev/topics/cache/#setting-up-the-cache
CACHES = {
'default': {
'BACKEND': 'django.core.cache.backends.locmem.LocMemCache',
},
'throttle': {
'BACKEND': 'django.core.cache.backends.locmem.LocMemCache',
'TIMEOUT': 60 * 5,
'OPTIONS': {
'MAX_ENTRIES': 2000
}
}
}
# We setup the location of the website template as well as the admin site.
TEMPLATES = [
{