Reg: global variable in vcl

Geoff Simmons geoff at
Fri May 17 15:14:00 UTC 2019

On 5/17/19 16:29, Nils Goroll wrote:
> * with respect to global variables and types:
>   On 17/05/2019 13:09, Geoff Simmons wrote:
>   > VMOD var supports global variables for the STRING, INT and REAL types,
>   not that I would be aware, to my knowledge the var vmod only supports
>   STRING for global variables.

Yeah I think you're right. I was confused by what the docs for VMOD var
say, IMO this could use some better clarity:

It supports strings, integers and real numbers. There are methods to get
and set each data type.

Global variables have a lifespan that extends across requests and
VCLs, for as long as the vmod is loaded.

The remaining functions have PRIV_TASK lifespan ...

The first sentence lists STRING, INT and REAL, and then further down
there's a contrast to the "remaining functions" with task scope. Since
the paragraph in the middle says something about global variables, I
thought it meant that there is support for global variables of those
three types.

If I'm reading the .vcc file correctly:

- VMOD var supports six types, not just those three (STRING, INT, REAL,

- It supports task scope for all six types.

- It also supports global scope for STRING.

** * * UPLEX - Nils Goroll Systemoptimierung

Scheffelstraße 32
22301 Hamburg

Tel +49 40 2880 5731
Mob +49 176 636 90917
Fax +49 40 42949753

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 833 bytes
Desc: OpenPGP digital signature
URL: <>

More information about the varnish-misc mailing list