Multiple fixes:

- Probably fix "more-geturl-bugs", but hard to verify.
  - Fix "last-modified-problem", approximately.  (Difficult or impossible
    in the general case for externally-retrieved content.)
  - Fix "rss-syndication".
  - Fix unnamed bug where Database caches would try to Storable::freeze
    non-references and thereby crash.
  - Fix "apache-version-component-in-wrong-place".
This commit is contained in:
Drake 2006-08-29 16:44:41 +00:00
parent 6f86645097
commit 936054ba19
7 changed files with 112 additions and 23 deletions

View file

@ -103,7 +103,8 @@ sub get {
$sth->finish;
my $content = $data->[0];
return undef unless ($content);
return thaw($content);
# Storable doesn't like non-reference arguments, so we wrap it in a scalar ref.
return ${thaw($content)};
}
#-------------------------------------------------------------------
@ -170,7 +171,8 @@ The time to live for this content. This is the amount of time (in seconds) that
sub set {
my $self = shift;
my $content = freeze(shift);
# Storable doesn't like non-reference arguments, so we wrap it in a scalar ref.
my $content = freeze(\(scalar shift));
my $ttl = shift || 60;
my $size = length($content);
# getting better performance using native dbi than webgui sql