/** @var int Seconds to store positions */
const POSITION_TTL = 60;
/** @var int Seconds to store position write index cookies (safely less than POSITION_TTL) */
- const POSITION_COOKIE_TTL = 60;
+ const POSITION_COOKIE_TTL = 10;
/** @var int Max time to wait for positions to appear */
const POS_STORE_WAIT_TIMEOUT = 5;
*/
public function __construct( BagOStuff $store, array $client, $posIndex = null ) {
$this->store = $store;
- $this->clientId = isset( $client['clientId'] )
- ? $client['clientId']
- : md5( $client['ip'] . "\n" . $client['agent'] );
+ $this->clientId = $client['clientId'] ??
+ md5( $client['ip'] . "\n" . $client['agent'] );
$this->key = $store->makeGlobalKey( __CLASS__, $this->clientId, 'v2' );
$this->waitForPosIndex = $posIndex;