Skip to content

Commit

Permalink
Fix Cache->reset for memcache (#170)
Browse files Browse the repository at this point in the history
  • Loading branch information
xfra35 committed Nov 17, 2016
1 parent 5c20d4c commit ce6c049
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion base.php
Original file line number Diff line number Diff line change
Expand Up @@ -2511,8 +2511,9 @@ function reset($suffix=NULL,$lifetime=0) {
foreach (memcache_get_extended_stats(
$this->ref,'cachedump',$id) as $data)
if (is_array($data))
foreach ($data as $key=>$val)
foreach (array_keys($data) as $key)
if (preg_match($regex,$key) &&
($val=memcache_get($this->ref,$key)) &&
$val[1]+$lifetime<time())
memcache_delete($this->ref,$key);
return TRUE;
Expand Down

0 comments on commit ce6c049

Please sign in to comment.