// A deleted key with a negative TTL left must be tombstoned
$isTombstone = ( $curTTL !== null && $value === false );
+ if ( $isTombstone && $lockTSE <= 0 ) {
+ // Use the INTERIM value for tombstoned keys to reduce regeneration load
+ $lockTSE = 1;
+ }
// Assume a key is hot if requested soon after invalidation
$isHot = ( $curTTL !== null && $curTTL <= 0 && abs( $curTTL ) <= $lockTSE );
// Use the mutex if there is no value and a busy fallback is given
if ( $lockAcquired ) {
// Avoid using delete() to avoid pointless mcrouter broadcasting
- $this->cache->changeTTL( self::MUTEX_KEY_PREFIX . $key, 1 );
+ $this->cache->changeTTL( self::MUTEX_KEY_PREFIX . $key, (int)$preCallbackTime - 60 );
}
return $value;
return array_diff( $keys, $keysFound );
}
- /**
+ /**
* @param array $keys
* @param array $checkKeys
* @return array Map of (cache key => mixed)