how storing objects for a given time, regardless of expire info from back-end?

Marco Walraven m.walraven at terantula.com
Tue Apr 13 17:26:44 CEST 2010


On Tue, Apr 13, 2010 at 05:03:28PM +0200, Dirk Taggesell wrote:
> sub vcl_fetch {
>   set obj.ttl = 7200s;
>   return(deliver);
> }
> 
> Throws an error when i try to start varnish:
> 
> Message from VCC-compiler:
> Variable 'obj.ttl' not accessible in method 'vcl_fetch'.
> At: (input Line 13 Pos 7)
>   set obj.ttl = 7200s;
> ------#######---------
> Running VCC-compiler failed, exit 1
> VCL compilation failed

Since you are running 2.1.0 (as you stated in a previous mail) you are running into 
some VCL changes.

'obj.* is now called beresp.* in vcl_fetch, and obj.* is now read-only'

So try 'set beresp.ttl =7200s;'
 
Marco

-- 
 Terantula - Industrial Strength Open Source
 phone:+31 64 3232 400 / www: http://www.terantula.com / pgpkey: E7EE7A46
 pgp fingerprint: F2EE 122D 964C DE68 7380 6F95 3710 7719 E7EE 7A46 



More information about the varnish-misc mailing list