"now" in VCL

Frank Gruellich frank.gruellich at mapsolute.com
Mon Aug 30 14:14:58 CEST 2010


Hi,

On 08/30/10 08:25, Tollef Fog Heen wrote:
> ]] Frank Gruellich 
> | root at floor [~] $ cat foo.vcl
> | sub vcl_recv {
> |         if (now)
> |         {
> |                 set req.backend = localhost;
> |         } else {
> |                 set req.backend = localhost;
> |         }
> | }
> 
> This VCL snippet doesn't make any sense; what are you trying to
> accomplish?

Yes, I'm aware of this.  I tried to strip down my real problem VCL, but
I just noticed that the real configuration isn't much bigger.  This is
the offending part:

sub vcl_miss {
	log "MISS: " now req.url;
	return (fetch);
}

sub vcl_hit {
	if (!obj.cacheable) {
		return (pass);
	}
	log "HIT: " now req.url;
	return (deliver);
}

I'm still getting a similar error message:

Message from VCC-compiler:
Expected ';' got 'now'
(program line 491), at
(input Line 123 Pos 22)
        log "MISS: " now req.url;
---------------------###---------
Running VCC-compiler failed, exit 1

"now" seems to be gone...

Kind regards,
-- 
Navteq (DE) GmbH
Frank Gruellich
Map24 Systems and Networks

Duesseldorfer Strasse 40a
65760 Eschborn
Germany

Phone:      +49 6196 77756-414
Fax:        +49 6196 77756-100

HRB 46215, Local Court Frankfurt am Main
Managing Directors: Thomas Golob, Hans Pieter Gieszen, Martin Robert Stockman
USt-ID-No.: DE 197947163

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 262 bytes
Desc: OpenPGP digital signature
URL: <https://www.varnish-cache.org/lists/pipermail/varnish-misc/attachments/20100830/d1f24577/attachment-0003.pgp>


More information about the varnish-misc mailing list