View unanswered posts | View active topics It is currently Sat Apr 27, 2024 11:10 pm



Reply to topic  [ 1 post ] 
pCache bug? 
Author Message
pChart user
pChart user

Joined: Wed Jan 04, 2012 10:02 pm
Posts: 5
Post 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?


Thu Jan 12, 2012 3:02 pm
Profile
Display posts from previous:  Sort by  
Reply to topic   [ 1 post ] 

Who is online

Users browsing this forum: No registered users and 13 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
cron