Bump some cache times up

About page goes from 10min to 30min (short cache to rotate the
quotes).

Search results go from 15min to 30 min.

Dynamic CSS goes from 6 hours to 48 hours, since we use cache busting
URLs everywhere these days, and on average they change very seldom.
This commit is contained in:
Magnus Hagander
2021-02-18 17:13:38 +01:00
parent d4bc8aaa93
commit ac30acb266
2 changed files with 3 additions and 3 deletions

View File

@ -89,7 +89,7 @@ def home(request):
# About page view (contains information about PostgreSQL + random quotes)
@cache(minutes=10)
@cache(minutes=30)
def about(request):
# get 5 random quotes
quotes = Quote.objects.filter(approved=True).order_by('?').all()[:5]
@ -212,7 +212,7 @@ _dynamic_cssmap = {
}
@cache(hours=6)
@cache(hours=48)
def dynamic_css(request, css):
if css not in _dynamic_cssmap:
raise Http404('CSS not found')

View File

@ -47,7 +47,7 @@ def generate_pagelinks(pagenum, totalpages, querystring):
@csrf_exempt
@cache(minutes=15)
@cache(minutes=30)
def search(request):
# Perform a general web search
# Since this lives in a different database, we open a direct