pChart 2.x forum http://wiki.pchart.net/forum/ |
|
pCache bug? http://wiki.pchart.net/forum/viewtopic.php?f=5&t=2326 |
Page 1 of 1 |
Author: | zigzag [ Thu Jan 12, 2012 3:02 pm ] |
Post subject: | pCache bug? |
Hi (sorry for bad english) I think i've found a bug in the pCache.class.php. The problem is when i'm doing a $MyCache->remove($id);, it clears the whole index.db instead of removing the object id. After digging in the code, I think I've found the problem: pCache.cache.php (Line 95) This line Code: $Expiry = isset($Settings["Expiry"]) ? $Settings["Expiry"] : -(24*60*60); $TS = time()-$Expiry; Should be : Code: $Expiry = isset($Settings["Expiry"]) ? $Settings["Expiry"] : (24*60*120); $TS = time()-$Expiry; - + - = +! Demo: Code: $a = 2; $b = -(1); $c = $a-$b; echo $c; //3! Am I right? |
Page 1 of 1 | All times are UTC |
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group http://www.phpbb.com/ |