X-Git-Url: https://git.heureux-cyclage.org/?a=blobdiff_plain;f=includes%2Flibs%2Fobjectcache%2FBagOStuff.php;h=8420f113ffeb29bf964ccd311b9d99b0e09e3e00;hb=ea22e3d1f6677884d8490d744ca15c65fd34c769;hp=f834ccf937a4447b6240c0b53775b6fd0ee50ef0;hpb=d455aa29a685971c8191bc38383f1514e7cae806;p=lhc%2Fweb%2Fwiklou.git diff --git a/includes/libs/objectcache/BagOStuff.php b/includes/libs/objectcache/BagOStuff.php index f834ccf937..8420f113ff 100644 --- a/includes/libs/objectcache/BagOStuff.php +++ b/includes/libs/objectcache/BagOStuff.php @@ -476,7 +476,7 @@ abstract class BagOStuff implements IExpiringStore, LoggerAwareInterface { $lSince = microtime( true ); // lock timestamp return new ScopedCallback( function () use ( $key, $lSince, $expiry ) { - $latency = .050; // latency skew (err towards keeping lock present) + $latency = 0.050; // latency skew (err towards keeping lock present) $age = ( microtime( true ) - $lSince + $latency ); if ( ( $age + $latency ) >= $expiry ) { $this->logger->warning( "Lock for $key held too long ($age sec)." ); @@ -732,7 +732,7 @@ abstract class BagOStuff implements IExpiringStore, LoggerAwareInterface { * @since 1.27 * @param string $keyspace * @param array $args - * @return string + * @return string Colon-delimited list of $keyspace followed by escaped components of $args */ public function makeKeyInternal( $keyspace, $args ) { $key = $keyspace; @@ -747,10 +747,11 @@ abstract class BagOStuff implements IExpiringStore, LoggerAwareInterface { * Make a global cache key. * * @since 1.27 - * @param string $keys,... Key component - * @return string + * @param string $class Key class + * @param string $component [optional] Key component (starting with a key collection name) + * @return string Colon-delimited list of $keyspace followed by escaped components of $args */ - public function makeGlobalKey() { + public function makeGlobalKey( $class, $component = null ) { return $this->makeKeyInternal( 'global', func_get_args() ); } @@ -758,10 +759,11 @@ abstract class BagOStuff implements IExpiringStore, LoggerAwareInterface { * Make a cache key, scoped to this instance's keyspace. * * @since 1.27 - * @param string $keys,... Key component - * @return string + * @param string $class Key class + * @param string $component [optional] Key component (starting with a key collection name) + * @return string Colon-delimited list of $keyspace followed by escaped components of $args */ - public function makeKey() { + public function makeKey( $class, $component = null ) { return $this->makeKeyInternal( $this->keyspace, func_get_args() ); }