Merged in [17843] from housley@vigilsec.com:

Create slowpages cache for some very stable pages
 - Legacy-Id: 17874
Note: SVN reference [17843] has been migrated to Git commit f7886df212
This commit is contained in:
Henrik Levkowetz 2020-05-21 22:03:38 +00:00
commit 65c6a878f7
3 changed files with 26 additions and 3 deletions

View file

@ -251,7 +251,7 @@ def wg_summary_acronym(request, group_type):
'groups': groups },
content_type='text/plain; charset=UTF-8')
@cache_page ( 60 * 60 )
@cache_page ( 60 * 60, cache="slowpages" )
def wg_charters(request, group_type):
if group_type != "wg":
raise Http404
@ -268,7 +268,7 @@ def wg_charters(request, group_type):
{ 'areas': areas },
content_type='text/plain; charset=UTF-8')
@cache_page ( 60 * 60 )
@cache_page ( 60 * 60, cache="slowpages" )
def wg_charters_by_acronym(request, group_type):
if group_type != "wg":
raise Http404

View file

@ -697,6 +697,13 @@ CACHES = {
'MAX_ENTRIES': 100000, # 100,000
},
},
'slowpages': {
'BACKEND': 'django.core.cache.backends.filebased.FileBasedCache',
'LOCATION': '/a/cache/datatracker/slowpages',
'OPTIONS': {
'MAX_ENTRIES': 5000,
},
},
}
HTMLIZER_VERSION = 1
@ -1118,7 +1125,15 @@ if SERVER_MODE != 'production':
'OPTIONS': {
'MAX_ENTRIES': 1000,
},
}
},
'slowpages': {
'BACKEND': 'django.core.cache.backends.dummy.DummyCache',
#'BACKEND': 'django.core.cache.backends.filebased.FileBasedCache',
'LOCATION': '/var/cache/datatracker/',
'OPTIONS': {
'MAX_ENTRIES': 5000,
},
},
}
SESSION_ENGINE = "django.contrib.sessions.backends.db"

View file

@ -35,6 +35,14 @@ CACHES = {
'MAX_ENTRIES': 100000,
},
},
'slowpages': {
'BACKEND': 'django.core.cache.backends.dummy.DummyCache',
#'BACKEND': 'django.core.cache.backends.filebased.FileBasedCache',
'LOCATION': '/var/cache/datatracker/slowpages',
'OPTIONS': {
'MAX_ENTRIES': 5000,
},
},
}
PASSWORD_HASHERS = [ 'django.contrib.auth.hashers.MD5PasswordHasher', ]