squid doesnt use cache when URL has a param - squid

This is a discussion on squid doesnt use cache when URL has a param - squid ; 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 http://www.foo.com/test.html The access ...

+ Reply to Thread
Results 1 to 2 of 2

Thread: squid doesnt use cache when URL has a param

  1. 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
    http://www.foo.com/test.html

    The access log shows:
    1208638403.776 608 192.168.77.2 TCP_MISS/200 5532 GET http://www.foo.com/test.html
    - DIRECT/XXX.YYY.Z.18 text/html
    1208638421.093 0 192.168.77.2 TCP_MEM_HIT/200 5566 GET
    http://www.foo.com/test.html - NONE/- text/html

    However, if the URL has a parameter, like http://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 GET
    http://www.foo.com/test.html? - DIRECT/XXX.YYY.Z.18 text/html
    1208638950.869 414 192.168.77.2 TCP_MISS/200 2792 GET
    http://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

  2. Re: squid doesnt use cache when URL has a param

    On Apr 19, 2:14*pm, cseifert wrote:
    > 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


    found the answer: http://wiki.squid-cache.org/ConfigEx...DynamicContent

+ Reply to Thread