Subject: | Responses without "Expires" header are not retrieved from cache |
see my patch below. if $obj->{expires} is not defined (I.E. the server didn't return it) the cache doesn't work. expires==0 should mean "never expires".
--- WithCache.pm (revision 9476)
+++ WithCache.pm (working copy)
@@ -36,7 +36,7 @@
if ( defined $obj ) {
# XXX: return cached response before "Expires"
- if (defined $obj->{expires} and $obj->{expires} > time()) {
+ unless (defined $obj->{expires} and $obj->{expires} <= time()) {
return HTTP::Response->parse($obj->{as_string});
}