Open beeyev opened 1 year ago
You can disable this at the Pool or Item level.
$pool->setInvalidationMethod(Stash\Invalidation::NONE)
This can be done on the item level as well. You may want to read through all the invalidation methods to see which one fits your needs most.
I checked it, but this parameter does not change the behavior I mentioned.
private function executeSet($data, $time)
{
...
// We need to be able to disable this part
if ($cacheTime > 0) {
$expirationDiff = rand(0, floor($cacheTime * .15));
$expiration -= $expirationDiff;
}
The library has this code to slightly change the expiration time.
I know the reason, it's also discussed here.
Could you please add an ability to disable this feature when it's needed? Developers should be able to set precise TTL when they really want to do that.