Doc #9807 [Opn->Bgs]: Problem with Test code for Cache_Lite

From: Date: Fri, 12 Jan 2007 05:19:05 +0000
Subject: Doc #9807 [Opn->Bgs]: Problem with Test code for Cache_Lite
References: 1  Groups: php.pear.doc 
Request: Send a blank email to pear-doc+get-9280@lists.php.net to get a copy of this message
Edit report at http://pear.php.net/bugs/bug.php?id=9807&edit=1 ID: 9807 Updated by: cweiske@php.net Reported By: shinji_ikari at mail dot com -Status: Open +Status: Bogus Type: Documentation Problem Package: Documentation Operating System: Windows XP PHP Version: Irrelevant New Comment: You did not understand how it works. When using get(), the internal $_id is set and used once you call save() unless you pass the $id as second parameter so the method. Previous Comments: ------------------------------------------------------------------------ [2007-01-11 23:32:54] shinji_ikari at mail dot com Description: ------------ Minor doc correction In the first example (simple example) in: http://pear.php.net/manual/en/package.caching.cache-lite.intro.php The following is incorrect: // (...) $Cache_Lite->save($data); } What I believe the programmer meant was: // (...) $Cache_Lite->save($id); } If you leave it as it is ($data), you always hit the cache since nothing is ever saved to the cached file. Actual result: -------------- The cache file is generated but due to the bug nothing is ever saved to the cache file. ------------------------------------------------------------------------ -- Edit this bug report at http://pear.php.net/bugs/bug.php?id=9807&edit=1

« previous php.pear.doc (#9280) next »