1 2 3 4 5 6 7 8 9 10 11 | from django.views.decorators.cache import cache_control
from someproj.someapp.views import foo_view
# ...
open_cache = cache_control(private=True, public=True)
urlpatterns = patterns('',
(r'^foo/$', open_cache(foo_view)),
# ...
)
|
More like this
- common model privacy by teepark 4 years, 6 months ago
- Decorating class-based views by lqc 1 week, 1 day ago
- per-function cache decorator by nicois 4 years ago
- Method Caching by bryanhelmig 7 months, 1 week ago
- Decorator that limits request methods by schinckel 2 years, 6 months ago
Comments