* @return mixed Session data
*/
static function read( $id ) {
+ $stime = microtime( true );
$data = self::getCache()->get( self::getKey( $id ) );
+ $real = microtime( true ) - $stime;
+
+ RequestContext::getMain()->getStats()->timing( "session.read", $real );
self::$hashCache = array( $id => self::getHash( $data ) );
if ( !isset( self::$hashCache[$id] )
|| self::getHash( $data ) !== self::$hashCache[$id]
) {
+ $stime = microtime( true );
self::getCache()->set( self::getKey( $id ), $data, $wgObjectCacheSessionExpiry );
+ $real = microtime( true ) - $stime;
+
+ RequestContext::getMain()->getStats()->timing( "session.write", $real );
}
return true;
* @return bool Success
*/
static function destroy( $id ) {
+ $stime = microtime( true );
self::getCache()->delete( self::getKey( $id ) );
+ $real = microtime( true ) - $stime;
+
+ RequestContext::getMain()->getStats()->timing( "session.destroy", $real );
return true;
}