Problem with Cache_Lite

From: Date: Fri, 13 Aug 2004 20:03:53 +0000
Subject: Problem with Cache_Lite
Groups: php.pear.general 
Request: Send a blank email to pear-general+get-14108@lists.php.net to get a copy of this message
Hello, I try to use Cache_Lite but it does not work as expected. Following Options: cacheDir :: /vat/tmp/ lifeTime :: 120 Code: // Load and set DHTML menu if ( $dhtmlmenu = $cache->get('dhtmlMenu') && $runCodeScript = $cache->get('runCodeScript') ) {
       $page->addScriptDeclaration(  $dhtmlmenu);
       $smarty->assign('topMenuGenScript', $runCodeScript);
print "Cache Used<br />"; } else {
       require 'classes/NavigationMenu.php';
       $menu =& new NavigationMenu();
       $page->addScriptDeclaration( $menu->get() );
       $smarty->assign('topMenuGenScript', $menu->getRunCodeScript() );
       $cache->save( $menu->get(), 'dhtmlmenu');
       $cache->save( $menu->getRunCodeScript(), 'runCodeScript');
print "Cache NOT Used<br />"; } I got always "Cache NOT Used" printed. Does I have something misunderstood? In /vat/tmp/ coes exist some 2 cache files so they got created, Thx in advance. Cheers -Peter

« previous php.pear.general (#14108) next »