[Varnish] #412: make caching still possible in case of 'restart' from vcl_fetch and implement 'restart' from vcl_hit
Varnish
varnish-bugs at projects.linpro.no
Fri Feb 13 01:18:54 CET 2009
#412: make caching still possible in case of 'restart' from vcl_fetch and
implement 'restart' from vcl_hit
-------------------------+--------------------------------------------------
Reporter: hajile | Owner: phk
Type: enhancement | Status: reopened
Priority: normal | Milestone:
Component: varnishd | Version: trunk
Severity: normal | Resolution:
Keywords: |
-------------------------+--------------------------------------------------
Comment (by hajile):
always forget clicking that preview button :/
{{{
--- bin/varnishd/cache_center.c (revision 3756)
+++ bin/varnishd/cache_center.c (working copy)
@@ -406,7 +406,17 @@
switch (sp->handling) {
case VCL_RET_RESTART:
- HSH_Drop(sp);
+ if (sp->obj->ttl == 0) {
+ sp->obj->cacheable = 0;
+ }
+ if (sp->obj->objhead != NULL && sp->obj->cacheable == 1) {
+ VRY_Create(sp);
+ EXP_Insert(sp->obj);
+ HSH_Unbusy(sp);
+ HSH_Deref(&sp->obj);
+ } else {
+ HSH_Drop(sp);
+ }
sp->director = NULL;
sp->restarts++;
sp->step = STP_RECV;
}}}
--
Ticket URL: <http://varnish.projects.linpro.no/ticket/412#comment:3>
Varnish <http://varnish.projects.linpro.no/>
The Varnish HTTP Accelerator
More information about the varnish-bugs
mailing list