Good day Per, yes, I added return(lookup) in vcl_hash and an issue has gone! Thanks a lot for support and for great community!
22.03.2016 14:14, Per Buer пишет:
On Fri, Mar 18, 2016 at 10:15 AM, Швабауэр Павел <[email protected] <mailto:[email protected]>> wrote:Good day team, I'm using varnish in our projects already long time, so thank you very much for this great technology! Let me explain 1 thing I can't realize already 2 weeks. so, here is task. Please take a look, we are using some sort ofsecurity in links, so every client has own generated links.(..) # The data on which the hashing will take place sub vcl_hash { ###### here we should modify url to try to return from cache if (req.url ~ "/book/$") { set req.http.cacheurl = regsub(req.url, "(.*)/(.*)/(.*)/(.*)$", "\1/\4"); std.log("hash rewrite was:" + req.url); std.log("become ::: "+req.http.cacheurl); } else { set req.http.cacheurl = req.url; } hash_data(req.http.cacheurl); if (req.http.host) { hash_data(req.http.host); } else { hash_data(server.ip); } }Here you hand over control to the builtin VCL. The builtin VCL will add req.url to the hash, which will more or less disable the caching.If you return(lookup) in vcl_hash you will stop processing. -- *Per Buer* CTO | Varnish Software AS Cell: +47 95839117 We Make Websites Fly! www.varnish-software.com <https://www.varnish-software.com/> <http://info.varnish-software.com/signature>
_______________________________________________ varnish-misc mailing list [email protected] https://www.varnish-cache.org/lists/mailman/listinfo/varnish-misc
