title: Why doesn't my tastypie cache get called?
body: <p>I'm looking at the <a href="http://django-tastypie.readthedocs.org/en/latest/caching.html" rel="nofollow">tastypie caching docs</a> and trying to set up my own simple caching thing, but the cache doesn't seem to get called.  When I visit <a href="http://localhost:8000/api/poll/?format=json" rel="nofollow">http://localhost:8000/api/poll/?format=json</a>, I get my tastypie generated json, but I don't get the output from the cache class.</p>
  
  <pre><code>from tastypie.resources import ModelResource
  from tastypie.cache import NoCache
  from .models import Poll
  
  
  class JSONCache(NoCache):
      def _load(self):
          print 'loading cache'
          data_file = open(settings.TASTYPIE_JSON_CACHE, 'r')
          return json.load(data_file)
  
      def _save(self, data):
          print 'saving to cache'
          data_file = open(settings.TASTYPIE_JSON_CACHE, 'w')
          return json.dump(data, data_file)
  
      def get(self, key):
          print 'jsoncache.get'
          data = self._load()
          return data.get(key, None)
  
      def set(self, key, value, timeout=60):
          print 'jsoncache.set'
          data = self._load()
          data[key] = value
          self._save(data)
  
  
  class PollResource(ModelResource):
      class Meta:
          queryset = Poll.objects.all()
          resource_name = 'poll'
          cache = JSONCache()
  </code></pre>