Change-Id: Iec59ce72f3dbb0de68c8f6704d86f1522f86827e
*/
interface IExpiringStore {
// Constants for TTL values, in seconds
*/
interface IExpiringStore {
// Constants for TTL values, in seconds
const TTL_MINUTE = 60;
const TTL_HOUR = 3600;
const TTL_DAY = 86400; // 24 * 3600
const TTL_MINUTE = 60;
const TTL_HOUR = 3600;
const TTL_DAY = 86400; // 24 * 3600
if ( $purge && $purge[self::FLD_TIME] < $purgeTimestamp ) {
$isStale = true;
$this->logger->warning( "Reaping stale check key '$key'." );
if ( $purge && $purge[self::FLD_TIME] < $purgeTimestamp ) {
$isStale = true;
$this->logger->warning( "Reaping stale check key '$key'." );
- $ok = $this->cache->changeTTL( self::TIME_KEY_PREFIX . $key, 1 );
+ $ok = $this->cache->changeTTL( self::TIME_KEY_PREFIX . $key, self::TTL_SECOND );
if ( !$ok ) {
$this->logger->error( "Could not complete reap of check key '$key'." );
}
if ( !$ok ) {
$this->logger->error( "Could not complete reap of check key '$key'." );
}
'cmd' => 'set',
'key' => $key,
'val' => 'PURGED:$UNIXTIME$:' . (int)$holdoff,
'cmd' => 'set',
'key' => $key,
'val' => 'PURGED:$UNIXTIME$:' . (int)$holdoff,
- 'ttl' => max( $ttl, 1 ),
+ 'ttl' => max( $ttl, self::TTL_SECOND ),
'sbt' => true, // substitute $UNIXTIME$ with actual microtime
] );
'sbt' => true, // substitute $UNIXTIME$ with actual microtime
] );