Add caching for song searching

This commit is contained in:
Daan Sprenkels
2018-08-16 23:32:20 +02:00
parent 641e5cb908
commit 2a340ef22c
4 changed files with 36 additions and 25 deletions

View File

@ -1,11 +1,11 @@
from datetime import datetime, timedelta
from django.core.cache import cache
from django.core.cache import caches
from django.shortcuts import render
def stats(request):
stats = cache.get('stats')
stats = caches['default'].get('stats')
status = 503
current_age = None
current_age_text = None