Login | Register For Free | Help
Search for: (Advanced)

Mailing List Archive: Varnish: Bugs

#984: [PATCH] When a non-cacheable status is returned, default TTL is applied

 

 

Varnish bugs RSS feed   Index | Next | Previous | View Threaded


varnish-bugs at varnish-cache

Aug 19, 2011, 8:59 AM

Post #1 of 3 (166 views)
Permalink
#984: [PATCH] When a non-cacheable status is returned, default TTL is applied

#984: [PATCH] When a non-cacheable status is returned, default TTL is applied
---------------------+------------------------------------------------------
Reporter: drwilco | Type: defect
Status: new | Priority: normal
Milestone: | Component: varnishd
Version: trunk | Severity: normal
Keywords: |
---------------------+------------------------------------------------------
In cache_center.c:
{{{
sp->wrk->exp.ttl = RFC2616_Ttl(sp);
}}}

In RFC2616_Ttl:
{{{
ttl = params->default_ttl;
}}}
...
{{{
switch (sp->err_code) {
default:
sp->wrk->exp.ttl = -1.;
break;
case 200: /* OK */
case 203: /* Non-Authoritative Information */
case 300: /* Multiple Choices */
case 301: /* Moved Permanently */
case 302: /* Moved Temporarily */
case 307: /* Temporary Redirect */
case 410: /* Gone */
case 404: /* Not Found */
}}}
...
{{{
return (ttl);
}}}

So even though RFC2616_Ttl sets sp->wrk->exp.ttl to -1, the return(ttl) at
the end overwrites that through the assignment in cache_center.c of the
return value.

So anything that's not a 200, 203, 300, 301, 302, 307, 410 or 404 will get
the default TTL instead of -1.

--
Ticket URL: <http://varnish-cache.org/trac/ticket/984>
Varnish <http://varnish-cache.org/>
The Varnish HTTP Accelerator

_______________________________________________
varnish-bugs mailing list
varnish-bugs [at] varnish-cache
https://www.varnish-cache.org/lists/mailman/listinfo/varnish-bugs


varnish-bugs at varnish-cache

Aug 26, 2011, 12:21 AM

Post #2 of 3 (140 views)
Permalink
Re: #984: [PATCH] When a non-cacheable status is returned, default TTL is applied [In reply to]

#984: [PATCH] When a non-cacheable status is returned, default TTL is applied
----------------------+-----------------------------------------------------
Reporter: drwilco | Type: defect
Status: closed | Priority: normal
Milestone: | Component: varnishd
Version: trunk | Severity: normal
Resolution: fixed | Keywords:
----------------------+-----------------------------------------------------
Changes (by Poul-Henning Kamp <phk@…>):

* status: new => closed
* resolution: => fixed


Comment:

(In [b22995084401716d63fac0882ef5b56725af0c49]) Recent changes to the
RFC2616 ttl calculation confused what ttl
value was actually being used.

Fixed by: DocWilco
Fixes #984

--
Ticket URL: </ticket/984#comment:1>
Varnish <http://varnish-cache.org/>
The Varnish HTTP Accelerator

_______________________________________________
varnish-bugs mailing list
varnish-bugs [at] varnish-cache
https://www.varnish-cache.org/lists/mailman/listinfo/varnish-bugs


varnish-bugs at varnish-cache

Aug 29, 2011, 1:46 AM

Post #3 of 3 (130 views)
Permalink
Re: #984: [PATCH] When a non-cacheable status is returned, default TTL is applied [In reply to]

#984: [PATCH] When a non-cacheable status is returned, default TTL is applied
----------------------+-----------------------------------------------------
Reporter: drwilco | Type: defect
Status: closed | Priority: normal
Milestone: | Component: varnishd
Version: trunk | Severity: normal
Resolution: fixed | Keywords:
----------------------+-----------------------------------------------------

Comment(by Tollef Fog Heen <tfheen@…>):

(In [de5f2e36b55ea89c7e7057dd5c43ffc928de8179]) Recent changes to the
RFC2616 ttl calculation confused what ttl
value was actually being used.

Fixed by: DocWilco
Fixes #984

--
Ticket URL: </ticket/984#comment:2>
Varnish <http://varnish-cache.org/>
The Varnish HTTP Accelerator

_______________________________________________
varnish-bugs mailing list
varnish-bugs [at] varnish-cache
https://www.varnish-cache.org/lists/mailman/listinfo/varnish-bugs

Varnish bugs RSS feed   Index | Next | Previous | View Threaded
 
 


Interested in having your list archived? Contact Gossamer Threads
 
  Web Applications & Managed Hosting Powered by Gossamer Threads Inc.