We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 98a7ff1 commit 2b3fa03Copy full SHA for 2b3fa03
readthedocs/api/v2/views/footer_views.py
@@ -17,7 +17,9 @@
17
highest_version,
18
parse_version_failsafe,
19
)
20
-
+from django.core.cache import get_cache, cache
21
+footer_cache = get_cache('footer')
22
+default_cache = get_cache('default')
23
24
def get_version_compare_data(project, base_version=None):
25
"""
readthedocs/settings/base.py
@@ -267,6 +267,10 @@ def USE_PROMOS(self): # noqa
267
'default': {
268
'BACKEND': 'django.core.cache.backends.locmem.LocMemCache',
269
'PREFIX': 'docs',
270
+ },
271
+ 'footer': {
272
+ 'BACKEND': 'django.core.cache.backends.filebased.FileBasedCache',
273
+ 'LOCATION': os.path.join(SITE_ROOT, 'readthedocs', 'api/v2/templates/restapi/footer.html' )
274
}
275
276
CACHE_MIDDLEWARE_SECONDS = 60
0 commit comments