跳转到主要内容

Django http Cache-Control头视图混合

项目描述

安装

$ [sudo] pip install django-http-cache-control-view
views.py
from django_http_cache_control_view.views import HttpCacheControlMixin

class MyView(HttpCacheControlMixin,...):
    http_cache_control_max_age = 60
class MyView(HttpCacheControlMixin,...):
    def get_http_cache_control_max_age(self):
        return 60

readme42.com

支持者

AWS AWS 云计算和安全赞助商 Datadog Datadog 监控 Fastly Fastly CDN Google Google 下载分析 Microsoft Microsoft PSF赞助商 Pingdom Pingdom 监控 Sentry Sentry 错误记录 StatusPage StatusPage 状态页面