public function invalidate(Request
$request): void
{ // @see https://github.com/symfony/symfony/issues/48301
} /**
* Cleanups storage.
*/
public function cleanup(): void
{ $keys =
array_keys($this->locks
);
$this->cache->
deleteItems($keys);
$this->locks =
[];
} /**
* Tries to lock the cache for a given Request, without blocking.
*/
public function lock(Request
$request): bool|string
{ $key =
$this->
getLockKey($request);
if ($this->cache->
hasItem($key)) { return $key;
}