PRIV_CALL issue in vmod

Poul-Henning Kamp phk at
Mon Sep 12 23:48:09 CEST 2011

In message <CANZWjw5t+Q0iEa-5rN6xriuy6Kw7i8Auq-z_vGj5uBKw9_gpog at>
, AD writes:

> I am trying to use the PRIV_CALL capability of the vmods in order to cache
>an expensive operation used later in the vcl itself. 

That is not how it works.

PRIV_CALL is for caching things for the next time this call is executed.

The canonical example is a caching a compiled regexp.

What you need is a "PRIV_SESS" or "PRIV_REQ" variable, and I'm beating
my head against the wall trying to find the best way to implement
that as we're speaking...

Poul-Henning Kamp       | UNIX since Zilog Zeus 3.20
phk at FreeBSD.ORG         | TCP/IP since RFC 956
FreeBSD committer       | BSD since 4.3-tahoe    
Never attribute to malice what can adequately be explained by incompetence.

More information about the varnish-misc mailing list