obj.ttl not available in vcl_deliver
Kristian Lyngstol
kristian at varnish-software.com
Mon Mar 28 12:52:13 CEST 2011
On Mon, Mar 21, 2011 at 10:39:50PM -0400, AD wrote:
> On Mon, Mar 21, 2011 at 10:30 PM, Ken Brownfield <kbrownfield at google.com>wrote:
>
> > Per lots of posts on this list, obj is now baresp in newer Varnish
> > versions. It sounds like the documentation for this change hasn't been
> > fully propagated.
Small clarification (which should go into the docs, somewhere):
obj.* still exists. beresp is the backend response which you can modify
in vcl_fetch. Upon exiting vcl_fetch, beresp is used to allocate space
for and populate the obj-structure.
The only part of obj.* that is available in vcl_deliver is obj.hits.
What you can do is store the ttl on req.http somewhere (assuming the
conversions work) in vcl_hit, then copy it onto resp.* in vcl_deliver.
- Kristian
More information about the varnish-misc
mailing list