Skip to content

Commit f37b842

Browse files
committed
refactor(cache): ensure lock acquisition
1 parent 304a635 commit f37b842

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

packages/cache/src/GenericLock.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ public function acquire(): bool
3838
expiration: $this->expiration,
3939
);
4040

41-
return true;
41+
return $this->cache->get($this->key) === $this->owner;
4242
}
4343

4444
public function execute(Closure $callback, null|DateTimeInterface|Duration $wait = null): mixed

0 commit comments

Comments
 (0)