VCL purge

André Øien Langvand andre at idium.no
Tue Mar 4 14:04:16 CET 2008


obj.hash is very useful, thank you.

Sadly, using double quotes doesnt help.

purge_hash(req.url + "#" + req.http.host);
-------------------#----------------------
Error: Expected ')' got '+'

purge_hash(req.url + '#' + req.http.host);
---------------------#--------------------
Error: Syntax error at

--
André Øien Langvand <andre at idium.no> - PGP: 0x7B1E3468
Systemadministrator - Idium AS - http://www.idium.no


Dag-Erling Smørgrav wrote:
> André Øien Langvand <andre at idium.no> writes:
>> Thank you, that makes sense now. However, I am still not able to make it
>> work. E.g using purge_hash(req.url + '#' + req.http.host + '#$'); throws
>> me an syntax error, failing at the apostrophe ('). Also tried diffrent
>> variations of quotation marks and backslashes. Is the escaping wrong?
> 
> Sorry, my bad: those should be double quotes, not single quotes.
> 
> I'm not sure you need the final #, btw.  An easy way to check is to
> add a custom header with obj.hash (should work in the latest trunk) to
> see what it really looks like.
> 
> DES



More information about the varnish-misc mailing list