-
-
Notifications
You must be signed in to change notification settings - Fork 451
Closed
Description
To set the expiration time, we should only pass the duration of the cache in seconds. The function driver_set of the driver is using an absolute time, adding the current unix time + expiration time, so my keys are never expiring. Removing time() from the expiration makes it work as expected.
File: phpfastcache/3.0.0/drivers/memcached.php
Code with the fix:
function driver_set($keyword, $value = "", $time = 300, $option = array() ) {
$this->connectServer();
if(isset($option['isExisting']) && $option['isExisting'] == true) {
return $this->instant->add($keyword, $value, $time );
} else {
return $this->instant->set($keyword, $value, $time );
}
}Metadata
Metadata
Assignees
Labels
No labels