Advertisement
jrujano

Untitled

Jul 14th, 2020
1,385
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.28 KB | None | 0 0
  1. from django.views.decorators.cache import cache_page
  2. from django.views.decorators.vary import vary_on_cookie
  3.  
  4.  
  5.   @method_decorator(cache_page(60 * 3))
  6.   @method_decorator(vary_on_cookie)
  7.   def list(self, request, *args, **kwargs):
  8.     return super().list(request, *args, **kwargs)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement