title: How can you use the @cache_page decorator with Django class based views?
body: <p>The only method that seems to be working is adding the decorator in urls.py which is ugly. </p>
  
  <p>Is there any way to apply this decorator in the view?</p>
  
  <pre><code>class HomeView(View):
      @method_decorator(cache_page(60 * 60))
      def dispatch(self, *args, **kwargs):
          return super(HomeView, self).dispatch(*args, **kwargs)
  </code></pre>
  
  <p>I've tried the above but it doesn't seem to be working.</p>