Apache-XBEL
view release on metacpan or search on metacpan
lib/Apache/XBEL.pm view on Meta::CPAN
# Check for existence
if (! -e $cache) {
$apache->log->debug("Cachefile '$cache' does not exist.");
return ($cache,0);
}
#
my $cache_mtime = (stat($cache))[9];
if ((stat(__FILE__))[9] > $cache_mtime ) {
$apache->log->debug("Cache is out of sync with handler.");
return ($cache,0);
}
if ((stat($file))[9] > $cache_mtime ) {
$apache->log->debug("Cache is out of sync with XBEL file.");
return ($cache,0);
}
my $xsl_file = $apache->dir_config("XslPath");
if ((stat($xsl_file))[9] > $cache_mtime) {
$apache->log->debug("Cache is out of sync with stylesheet.");
$xsl_stylesheet = $xml_parser->parse_file($xsl_file);
$xsl_transformer = $xsl_parser->parse_stylesheet($xsl_stylesheet);
return ($cache,0);
}
return ($cache,1);
}
( run in 1.437 second using v1.01-cache-2.11-cpan-49f99fa48dc )