Commit f6aaa5f2 authored by fred's avatar fred
Browse files

set shorter cache livespan for onair.json

parent d5b96b88
...@@ -2,6 +2,7 @@ from datetime import datetime, timedelta ...@@ -2,6 +2,7 @@ from datetime import datetime, timedelta
import time import time
import math import math
from django.views.decorators.cache import cache_control
from django.views.generic.base import TemplateView from django.views.generic.base import TemplateView
from django.views.generic.detail import DetailView from django.views.generic.detail import DetailView
from django.views.decorators.csrf import csrf_exempt from django.views.decorators.csrf import csrf_exempt
...@@ -442,6 +443,7 @@ class Listen(TemplateView): ...@@ -442,6 +443,7 @@ class Listen(TemplateView):
listen = Listen.as_view() listen = Listen.as_view()
@cache_control(max_age=25)
@csrf_exempt @csrf_exempt
@to_json('api') @to_json('api')
def onair(request): def onair(request):
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment