Datei: /php/append.php, Stand: 26.11.2001, 13:32
<?php
// we get here only if the page was not cached!
// get the content of the output buffer.
$content = $cache->endGet();
// parse the page - turn the Markup into HTML
// you might do some XML/XSLT tricks here, I preferr some
// simple regex + templates
$content = $p->getContentPage($content);
// generate a checksum on all things this page depends on.
// Output_Cache::get() will check the checksum on every request
// using whatever algorithm you use.
$userdata = sprintf("%s %d %s",
$DOCUMENT_ROOT . $PHP_SELF,
filemtime($DOCUMENT_ROOT . $PHP_SELF),
getChecksum()
);
if ($nocache || $no_cache) {
die($content);
} else {
$cache->extSave($id, $content, $userdata, $expires);
$cache->printContent();
}
// does not work with compression
// print '<p><font size="1" face="Arial, Helvetica" color="#505050">Cache miss.</font></p>';
?>