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, 10 months ago
- Decorating class-based views by lqc 3 months, 3 weeks ago
- Binding signals to abstract models by andreterra 1 week, 3 days ago
- per-function cache decorator by nicois 4 years, 4 months ago
- New view decorator to only cache pages for anonymous users by vaughnkoch 1 year, 7 months ago
Comments