Show
Ignore:
Timestamp:
06/10/07 10:49:43 (3 years ago)
Author:
phk
Message:

Take a shot at light-weight "Vary:" processing.

When we cache an object with a "Vary:" header, we generate
a "vary matching string" which can be used to efficiently
check for compliance when doing a cache lookup.

Only very lightly tested (ie: cnn.com).

For a full description of the reasoning, please see

 http://varnish.projects.linpro.no/wiki/ArchitectureVary

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • trunk/varnish-cache/bin/varnishd/cache_hash.c

    r1503 r1506  
    149149                } 
    150150        were_back: 
    151                 /* XXX: check Vary: */ 
    152151                if (!o->cacheable) { 
    153152                        /* ignore */ 
     
    160159                        VSL(SLT_ExpBan, 0, "%u was banned", o->xid); 
    161160                        EXP_TTLchange(o); 
    162                 } else 
     161                } else if (VRY_Match(sp, o->vary)) 
    163162                        break; 
    164163                o->refcnt--; 
     
    255254                free(o->http.ws->s); 
    256255 
     256        if (o->vary != NULL) 
     257                free(o->vary); 
     258 
    257259        HSH_Freestore(o); 
    258260        free(o);