Any way to invoke code from VCL after a request has been serviced?

Dridi Boukelmoune dridi at varni.sh
Tue May 9 12:13:58 CEST 2017


On Tue, May 9, 2017 at 9:40 AM, Guillaume Quintard
<guillaume at varnish-software.com> wrote:
> Have a look at varnishncsa and varnishlog, and more specifically to the
> function they set VUT.dispatch_f to, that should put you on the right
> tracks. If not, ping me on IRC, or here.

The shared memory log is the best place to do that, however the VUT
(Varnish UTility) API is not yet public [1] so for now you have to
carry a copy of the headers in your project. For Varnish 5.1.2+ I
started a tutorial-as-a-repo [2] although progress on the tutorial
side is around 0% at the moment. You still get a working project for a
VUT (and you can get rid of the VMOD or VCL stuff if you don't need
them).

You can probably find libvarnishapi bindings for other languages but
that's not something we support.

Dridi

[1] https://github.com/varnishcache/varnish-cache/pull/2314
[2] https://github.com/Dridi/varnish-template



More information about the varnish-misc mailing list