AW: AW: Varnish ALWAYS getting index from backend
Neil.Scholten at scoyo.com
Neil.Scholten at scoyo.com
Wed Dec 10 10:51:46 CET 2008
Hi,
Sorry, just Cut&Pasted the example.
I had a look in our configuration:
/* marker for vcl_deliver to reset Age: */
set obj.http.magicmarker = "1";
Just add the "" and it should work.
The error you had pointed the direction:
"Expected string variable or constant"
--neil
-----Ursprüngliche Nachricht-----
Von: varnish-misc-bounces at projects.linpro.no [mailto:varnish-misc-bounces at projects.linpro.no] Im Auftrag von Tomasz Leszczyn'ski
Gesendet: Mittwoch, 10. Dezember 2008 09:43
An: Scholten, Neil, scoyo
Cc: varnish-misc at projects.linpro.no
Betreff: Re: AW: Varnish ALWAYS getting index from backend
Neil.Scholten at scoyo.com pisze:
> Hi,
>
> How about the example from the varnish-site?
>
> http://varnish.projects.linpro.no/wiki/VCLExampleLongerCaching
>
> Here's the example:
>
> sub vcl_fetch {
>
> if (obj.cacheable) {
> /* Remove Expires from backend, it's not long
enough */
> unset obj.http.expires;
>
> /* Set the clients TTL on this object */
> set obj.http.cache-control = "max-age = 900";
>
> /* Set how long Varnish will keep it */
> set obj.ttl = 1w;
>
> /* marker for vcl_deliver to reset Age: */
> set obj.http.magicmarker = 1;
> }
> }
>
> sub vcl_deliver {
> if (resp.http.magicmarker) {
> /* Remove the magic marker */
> unset resp.http.magicmarker;
>
> /* By definition we have a fresh object */
> set resp.http.age = "0";
> }
> }
>
> Worked for us so far.
Expected string variable or constant
(/etc/varnish.conf Line 19 Pos 44)
set obj.http.magicmarker = 1;
-------------------------------------------#-
VCL compilation failed
Version:
piorin:~# varnishd -V
varnishd (varnish-2.0.2)
Copyright (c) 2006-2008 Linpro AS / Verdens Gang AS
_______________________________________________
varnish-misc mailing list
varnish-misc at projects.linpro.no
http://projects.linpro.no/mailman/listinfo/varnish-misc
More information about the varnish-misc
mailing list