matts 2005/10/24 11:41:45
Modified: lib/Apache/AxKit Cache.pm Log: Fix retrieving cache for gzipped cache files. Revision Changes Path 1.14 +3 -3 xml-axkit/lib/Apache/AxKit/Cache.pm Index: Cache.pm =================================================================== RCS file: /home/cvs/xml-axkit/lib/Apache/AxKit/Cache.pm,v retrieving revision 1.13 retrieving revision 1.14 diff -u -r1.13 -r1.14 --- Cache.pm 14 Jul 2005 18:43:33 -0000 1.13 +++ Cache.pm 24 Oct 2005 18:41:45 -0000 1.14 @@ -171,10 +171,10 @@ } sub get_fh { - my $self = shift; + my ($self, $gzip) = @_; return if $self->{no_cache}; my $fh = Apache->gensym(); - if (AxKit::sysopen($fh, $self->{file}, O_RDONLY, 'raw')) { + if (AxKit::sysopen($fh, $self->{file} . ($gzip ? '.gz' : ''), O_RDONLY, 'raw')) { flock($fh, LOCK_SH); return $fh; }