* Follow up to
2be60e777
Change-Id: Ic5c27226bc3f5cc870728a925b504a0dcbedaefb
if ( !$value ) {
// No hash found at all; cache must regenerate to be safe
if ( !$value ) {
// No hash found at all; cache must regenerate to be safe
- } elseif ( ( time() - $value['latest'] ) < WANObjectCache::HOLDOFF_TTL ) {
- // Cache was recently updated via replace() and should be up-to-date
- $expired = false;
- // See if the "check" key was bumped after the hash was generated
- $expired = ( $curTTL < 0 );
+ $hash = $value['hash'];
+ if ( ( time() - $value['latest'] ) < WANObjectCache::HOLDOFF_TTL ) {
+ // Cache was recently updated via replace() and should be up-to-date
+ $expired = false;
+ } else {
+ // See if the "check" key was bumped after the hash was generated
+ $expired = ( $curTTL < 0 );
+ }
- return array( $value['hash'], $expired );
+ return array( $hash, $expired );