• Poul-Henning Kamp's avatar
    Originally, we did not have the bereq.* and beresp.* variable sets, · d35d8fee
    Poul-Henning Kamp authored
    and instead (ab)used the obj.* set.
    
    This allowed, amongst other things, the headers of cached objects
    to be munged by subsequent cache-hits.
    
    This was just as bad an idea as it sounds.
    
    The downside was, that we had to reserve object workspace for the
    potentially created headers, and this really bites, memory wise,
    if your content is many small objects.
    
    This commit allows, and sets obj_workspace to zero, allocating only
    as much space as is necessary for the actual headers after vcl_fetch()
    has returned.
    
    The downside is, without extra workspace, you can no longer change
    the content of obj.* string variables after the vcl_fetch() which
    instantiated the object.
    
    For now we still allow the obj_workspace to be set to reserve such
    space, but in all likelyhood, this ability will disappear in the
    future.
    
    
    
    
    
    git-svn-id: http://www.varnish-cache.org/svn/trunk@4224 d4fa192b-c00b-0410-8231-f00ffab90ce4
    d35d8fee
cache.h 18.8 KB