django-smartcc:django中间件,将有助于在视图上设置缓存控制标头

时间:2021-05-26 06:47:16
【文件属性】:
文件名称:django-smartcc:django中间件,将有助于在视图上设置缓存控制标头
文件大小:11KB
文件格式:ZIP
更新时间:2021-05-26 06:47:16
http middleware django python-library headers django-smartcc 自动设置一些与缓存相关的标头,将未经身份验证的请求定义为公共,将经过身份验证的请求定义为私有。 您也可以为特定的URL自定义这些值。 该中间件类还将设置以下HTTP标头: 各不相同 缓存控制 过期时间 该中间件有效并且旨在将Django与CloudFlare Cache(或类似服务)集成。 用于MinbilDinbil.dk服务器上的生产中。 安装 在您的requirements.txt文件中添加django-smartcc或直接启动: pip install -U django-smartcc 然后在已安装的应用程序和中间件中添加django-smartcc,因此将这些行添加到settings.py文件中。 # settings.py MIDDLEWARE_CLASSES += [ 'smart_cache_control.middlew
【文件预览】:
django-smartcc-master
----smart_cache_control()
--------middleware.py(3KB)
--------__init__.py(0B)
----MANIFEST(118B)
----LICENSE(18KB)
----setup.py(919B)
----.gitignore(675B)
----README.md(2KB)

网友评论