Browse Source

Add a Cache-control header on /isp.json

Baptiste Jonglez 10 years ago
parent
commit
3f497741ef
1 changed files with 2 additions and 0 deletions
  1. 2 0
      coin/isp_database/views.py

+ 2 - 0
coin/isp_database/views.py

@@ -5,10 +5,12 @@ import json
 
 from django.shortcuts import render
 from django.http import HttpResponse, Http404
+from django.views.decorators.cache import cache_control
 
 from coin.isp_database.models import ISPInfo
 
 
+@cache_control(max_age=7200)
 def isp_json(request):
     try:
         isp = ISPInfo.objects.get()