532 |
# be used for all (like Last-Modified, and cache control data) |
# be used for all (like Last-Modified, and cache control data) |
533 |
|
|
534 |
# if we have a cached piece of fresh data, return that one |
# if we have a cached piece of fresh data, return that one |
535 |
if ( ($self->{"crl"}[$i]{"state"}{"freshuntil"} || 0) > time and |
if ( !$self->{"nocache"} and |
536 |
|
($self->{"crl"}[$i]{"state"}{"freshuntil"} || 0) > time and |
537 |
$self->{"crl"}[$i]{"state"}{"b64data"} ) { |
$self->{"crl"}[$i]{"state"}{"b64data"} ) { |
538 |
$::log->verb(3,"Using cached content for",$self->{"alias"},"index",$i); |
$::log->verb(3,"Using cached content for",$self->{"alias"},"index",$i); |
539 |
$::log->verb(4,"Content dated", |
$::log->verb(4,"Content dated", |
606 |
|
|
607 |
$self->{"crl"}[$i]{"state"}{"retrievaltime"} = time; |
$self->{"crl"}[$i]{"state"}{"retrievaltime"} = time; |
608 |
$self->{"crl"}[$i]{"state"}{"sourceurl"} = $response{"sourceurl"}||"null:"; |
$self->{"crl"}[$i]{"state"}{"sourceurl"} = $response{"sourceurl"}||"null:"; |
609 |
$self->{"crl"}[$i]{"state"}{"freshuntil"} = |
$self->{"crl"}[$i]{"state"}{"freshuntil"} = $response{"freshuntil"}||time; |
|
($self->{"nocache"}? 0 : $response{"freshuntil"}||time); |
|
610 |
$self->{"crl"}[$i]{"state"}{"lastmod"} = $response{"lastmod"}||time; |
$self->{"crl"}[$i]{"state"}{"lastmod"} = $response{"lastmod"}||time; |
611 |
|
|
612 |
} |
} |