apache 无缓存,过期
我正在尝试对我的网站上的 csv 文件强制执行无缓存。
我通过 apache 的文档将这些行添加到 httpd.conf 中:
ExpiresActive On
ExpiresDefault A0
<FilesMatch "\.(html|csv|htm)$">
ExpiresDefault A0
Header set Cache-Control "no-cache, no-store, must-revalidate, max-age=0, proxy-revalidate, no-transform"
Header set Pragma "no-cache"
</FilesMatch>
但是当我第一次尝试获取该页面时,我在 csv 文件中得到了这个:
Request Method:GET
Status Code:200 OK (from cache)
你知道我做错了什么吗?!
谢谢!!
加比。
I am trying to force no-cache on csv file on my site.
I added those lines to httpd.conf, by the documentation from apache:
ExpiresActive On
ExpiresDefault A0
<FilesMatch "\.(html|csv|htm)$">
ExpiresDefault A0
Header set Cache-Control "no-cache, no-store, must-revalidate, max-age=0, proxy-revalidate, no-transform"
Header set Pragma "no-cache"
</FilesMatch>
But when I am trying to get the page at the first time, i get this on the csv file :
Request Method:GET
Status Code:200 OK (from cache)
Do you have any idea what i am doing wrong?!
Thanks!!
Gabi.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
我检查了一下,发现我启用了 Django 中间件,它们处理了缓存..我禁用了它,现在它可以工作了..
抱歉..:)
I checked it out and saw I have Django Middleware enabled, thet handled the cache.. I disabled it and now it works..
Sorry.. :)