Synthetic objects

Poul-Henning Kamp phk at
Thu Jun 27 12:28:58 CEST 2013

I think I have made up my mind about how to do synthetic objects in
V4, but I'd like to run the idea past you guys first.

In vcl_backend_(fetch|response){} you do:

	return (synth(777));

Then you end up in vcl_backend_synth{} where, like in vcl_error{}, you
can flesh out the object with headers and a body.

The object will have a TTL of zero by default, but you can change that
if you want to cache the object (unless it's a pass of course).

Good or bad idea ?


PS: Yes, I do realize that together with std.fileread() this makes
Varnish a webserver, but I trust^H^H^H^H^Hhope that people will
restrain themselves

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-dev mailing list