How to use in squid 2.7 the 3.1 feature “ignore-cc”

做~自己de王妃 提交于 2019-12-25 05:25:29

问题


There is any way to ignore client "Cache-Control: max-age=0" and always let squid to return stale content?

In Squid 3.2 works using "ignore-cc" and the request never reaches backend (only while revalidating), always is stale but in Squid 2.7 works fine unless you send the Cache-control: max-age=0 and If-Modified-Since headers.


回答1:


Well, after trying all alternatives, I modified the source code to implement the feature.

I changed in the Squid-2.7-stable9 the file src/refresh.c:282:

282:    if (request) {

for

282:    if (request && FALSE) {

They do something like that in the 3.X to implement ignoreCc:

269:    if (request && !request->flags.ignore_cc) {

Worked as expected.



来源:https://stackoverflow.com/questions/12846107/how-to-use-in-squid-2-7-the-3-1-feature-ignore-cc

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!