squid doesnt use cache when URL has a param
Hi there, I configured my squid installation (2.6) to pretty much try
accessing pages always from the cache. This is working fine when I
access a page that does not contain any params on the URL, like
[url]http://www.foo.com/test.html[/url]
The access log shows:
1208638403.776 608 192.168.77.2 TCP_MISS/200 5532 GET [url]http://www.foo.com/test.html[/url]
- DIRECT/XXX.YYY.Z.18 text/html
1208638421.093 0 192.168.77.2 TCP_MEM_HIT/200 5566 GET
[url]http://www.foo.com/test.html[/url] - NONE/- text/html
However, if the URL has a parameter, like [url]http://www.foo.com/test.html?test[/url],
this doesnt work anymore.
The access log shows:
1208638947.412 422 192.168.77.2 TCP_MISS/200 2792 GET
[url]http://www.foo.com/test.html?[/url] - DIRECT/XXX.YYY.Z.18 text/html
1208638950.869 414 192.168.77.2 TCP_MISS/200 2792 GET
[url]http://www.foo.com/test.html?[/url] - DIRECT/XXX.YYY.Z.18 text/html
I can imagine why Squid is behaving that way. If the param is passed
in, there is likely to be some processing on the server side returning
different content. HOwever, if the processing is deterministic, the
resulting page should be the same and therefore could be cached.
Is there a way to configure squid to behave like this?
Any insights would be greatly appreciated.
Thanks
Christian
Re: squid doesnt use cache when URL has a param
On Apr 19, 2:14*pm, cseifert <christian.seif...@gmail.com> wrote:[color=blue]
> Hi there, I configured my squid installation (2.6) to pretty much try
> accessing pages always from the cache. This is working fine when I
> access a page that does not contain any params on the URL, likehttp://www.foo.com/test.html
>
> The access log shows:
> 1208638403.776 * *608 192.168.77.2 TCP_MISS/200 5532 GEThttp://www.foo..com/test.html
> - DIRECT/XXX.YYY.Z.18 text/html
> 1208638421.093 * * *0 192.168.77.2 TCP_MEM_HIT/200 5566 GEThttp://www.foo.com/test.html- NONE/- text/html
>
> However, if the URL has a parameter, likehttp://www.foo.com/test.html?test,
> this doesnt work anymore.
>
> The access log shows:
> 1208638947.412 * *422 192.168.77.2 TCP_MISS/200 2792 GEThttp://www.foo..com/test.html?- DIRECT/XXX.YYY.Z.18 text/html
> 1208638950.869 * *414 192.168.77.2 TCP_MISS/200 2792 GEThttp://www.foo..com/test.html?- DIRECT/XXX.YYY.Z.18 text/html
>
> I can imagine why Squid is behaving that way. If the param is passed
> in, there is likely to be some processing on the server side returning
> different content. HOwever, if the processing is deterministic, the
> resulting page should be the same and therefore could be cached.
>
> Is there a way to configure squid to behave like this?
>
> Any insights would be greatly appreciated.
>
> Thanks
> Christian[/color]
found the answer: [url]http://wiki.squid-cache.org/ConfigExamples/DynamicContent[/url]