Skip to content

Commit a8282f5

Browse files
Filebased footer file cache
1 parent 98a7ff1 commit a8282f5

File tree

2 files changed

+4
-1
lines changed

2 files changed

+4
-1
lines changed

readthedocs/api/v2/views/footer_views.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,6 @@
1818
parse_version_failsafe,
1919
)
2020

21-
2221
def get_version_compare_data(project, base_version=None):
2322
"""
2423
Retrieve metadata about the highest version available for this project.

readthedocs/settings/base.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -267,6 +267,10 @@ def USE_PROMOS(self): # noqa
267267
'default': {
268268
'BACKEND': 'django.core.cache.backends.locmem.LocMemCache',
269269
'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' )
270274
}
271275
}
272276
CACHE_MIDDLEWARE_SECONDS = 60

0 commit comments

Comments
 (0)