@@ -476,18 +476,18 @@ public function testAcquireReadTwiceWithExpiration()
476
476
public function save (Key $ key ): void
477
477
{
478
478
$ key ->reduceLifetime ($ this ->initialTtl );
479
- $ this ->keys [spl_object_hash ($ key )] = $ key ;
479
+ $ this ->keys [spl_object_id ($ key )] = $ key ;
480
480
$ this ->checkNotExpired ($ key );
481
481
}
482
482
483
483
public function delete (Key $ key ): void
484
484
{
485
- unset($ this ->keys [spl_object_hash ($ key )]);
485
+ unset($ this ->keys [spl_object_id ($ key )]);
486
486
}
487
487
488
488
public function exists (Key $ key ): bool
489
489
{
490
- return isset ($ this ->keys [spl_object_hash ($ key )]);
490
+ return isset ($ this ->keys [spl_object_id ($ key )]);
491
491
}
492
492
493
493
public function putOffExpiration (Key $ key , $ ttl ): void
@@ -520,18 +520,18 @@ public function testAcquireTwiceWithExpiration()
520
520
public function save (Key $ key ): void
521
521
{
522
522
$ key ->reduceLifetime ($ this ->initialTtl );
523
- $ this ->keys [spl_object_hash ($ key )] = $ key ;
523
+ $ this ->keys [spl_object_id ($ key )] = $ key ;
524
524
$ this ->checkNotExpired ($ key );
525
525
}
526
526
527
527
public function delete (Key $ key ): void
528
528
{
529
- unset($ this ->keys [spl_object_hash ($ key )]);
529
+ unset($ this ->keys [spl_object_id ($ key )]);
530
530
}
531
531
532
532
public function exists (Key $ key ): bool
533
533
{
534
- return isset ($ this ->keys [spl_object_hash ($ key )]);
534
+ return isset ($ this ->keys [spl_object_id ($ key )]);
535
535
}
536
536
537
537
public function putOffExpiration (Key $ key , $ ttl ): void
0 commit comments