req.hash using req.url without query string ?

cosmih cosmih at gmail.com
Thu Apr 21 12:17:41 CEST 2011


Hi,

By default the cache key is made using req.http.host and req.url and this
means that for the same resource requested with a different query string we
have a different cache key, object.
However I need that for few specific URLs (static content) to have only one
cache object per URL and serve it no matter what query string I have.
Something like in the below example:

Lets suppose that I have the following URLs:

www.example.com/a_specific_path/image.png?parameter1=value1
www.example.com/a_specific_path/image.png?parameter2=value2
www.example.com/a_specific_path/image.png?parameter3=value3
:
:
www.example.com/a_specific_path/image.png?parameterN=valueN

I want to use only
/a_specific_path/image.png   +  req.http.host

for creating/checking  the cache key and to serve this cache object no
matter what query string "parameterN=valueN" I have to this specific URL.

It is possible ?

Thanks,

--
Cosmih
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://www.varnish-cache.org/lists/pipermail/varnish-misc/attachments/20110421/987ab9b8/attachment-0003.html>


More information about the varnish-misc mailing list