title: Django--URL Caching Failing for Class Based Views
body: <p>I've built a RESTful API on top of the Django Rest Framework.  The URL conf for the API is composed of class based views. </p>
  
  <p>I would like to cache these views, however, the following is failing. Any thoughts on why that might be and how I could change it?</p>
  
  <pre><code>   from django.views.decorators.cache import cache_page
  
     urlpatterns = patterns('',
     url(r'^dounces/?$', cache_page(60*60)(DounceListView.as_view(resource=DounceResource)), name='dounces_api'),
  </code></pre>
  
  <p>I have the following middleware installed. </p>
  
  <pre><code>'django.middleware.gzip.GZipMiddleware',
  'django.middleware.common.CommonMiddleware',
  'django.contrib.sessions.middleware.SessionMiddleware',
  'django.contrib.auth.middleware.AuthenticationMiddleware',
  'django.contrib.messages.middleware.MessageMiddleware',
  'django.middleware.transaction.TransactionMiddleware',
  'django.contrib.redirects.middleware.RedirectFallbackMiddleware',
  </code></pre>
  
  <p>AND for local testing, i'm using the default caching backend:</p>
  
  <pre><code> 'BACKEND': 'django.core.cache.backends.locmem.LocMemCache',
  </code></pre>