Stefan Scherfke  committed f4365b3

Added page caching for lastfm view

  • Participants
  • Parent commits 536b8c9

Comments (0)

Files changed (1)

File lastfm/

 from django.conf import settings
 from django.http import HttpResponse
 from django.utils import simplejson as json
+from django.views.decorators.cache import cache_page
 URL = ''
 LASTFM_IMG_SIZE = getattr(settings, 'LASTFM_IMG_SIZE', 'large')
+@cache_page(60 * 5)
 def lastfm_data(request):
     """This view retrievs the data from and returns a JSON encoded list.
     The template tag’s AJAX code will retrive this list and generate the chart