Changeset 1506
- Timestamp:
- 10/06/07 10:49:43 (3 years ago)
- Location:
- trunk/varnish-cache/bin/varnishd
- Files:
-
- 1 added
- 4 modified
-
Makefile.am (modified) (1 diff)
-
cache.h (modified) (2 diffs)
-
cache_center.c (modified) (1 diff)
-
cache_hash.c (modified) (3 diffs)
-
cache_vary.c (added)
Legend:
- Unmodified
- Added
- Removed
-
trunk/varnish-cache/bin/varnishd/Makefile.am
r1504 r1506 26 26 cache_session.c \ 27 27 cache_synthetic.c \ 28 cache_vary.c \ 28 29 cache_vcl.c \ 29 30 cache_vrt.c \ -
trunk/varnish-cache/bin/varnishd/cache.h
r1503 r1506 225 225 unsigned xid; 226 226 struct objhead *objhead; 227 228 unsigned char *vary; 227 229 228 230 unsigned heap_idx; … … 463 465 /* cache_synthetic.c */ 464 466 void SYN_ErrorPage(struct sess *sp, int status, const char *reason, int ttl); 467 468 /* cache_vary.c */ 469 void VRY_Create(struct sess *sp); 470 int VRY_Match(struct sess *sp, unsigned char *vary); 465 471 466 472 /* cache_vcl.c */ -
trunk/varnish-cache/bin/varnishd/cache_center.c
r1503 r1506 299 299 sp->obj->cacheable = 1; 300 300 if (sp->obj->objhead != NULL) { 301 VRY_Create(sp); 301 302 HSH_Ref(sp->obj); /* get another, STP_DELIVER will deref */ 302 303 HSH_Unbusy(sp->obj); -
trunk/varnish-cache/bin/varnishd/cache_hash.c
r1503 r1506 149 149 } 150 150 were_back: 151 /* XXX: check Vary: */152 151 if (!o->cacheable) { 153 152 /* ignore */ … … 160 159 VSL(SLT_ExpBan, 0, "%u was banned", o->xid); 161 160 EXP_TTLchange(o); 162 } else 161 } else if (VRY_Match(sp, o->vary)) 163 162 break; 164 163 o->refcnt--; … … 255 254 free(o->http.ws->s); 256 255 256 if (o->vary != NULL) 257 free(o->vary); 258 257 259 HSH_Freestore(o); 258 260 free(o);
