Skip to content

Commit

Permalink
Create slowpages cache for some very stable pages
Browse files Browse the repository at this point in the history
 - Legacy-Id: 17843
  • Loading branch information
russhousley committed May 19, 2020
1 parent a44a80b commit f7886df
Show file tree
Hide file tree
Showing 3 changed files with 26 additions and 3 deletions.
4 changes: 2 additions & 2 deletions ietf/group/views.py
Expand Up @@ -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
Expand All @@ -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
Expand Down
17 changes: 16 additions & 1 deletion ietf/settings.py
Expand Up @@ -715,6 +715,13 @@ def skip_unreadable_post(record):
'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
Expand Down Expand Up @@ -1137,7 +1144,15 @@ def skip_unreadable_post(record):
'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"

Expand Down
8 changes: 8 additions & 0 deletions ietf/settings_testcrawl.py
Expand Up @@ -35,6 +35,14 @@
'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', ]
Expand Down

0 comments on commit f7886df

Please sign in to comment.