From f285e9aa1f2a65d3126f475c5b694e6a952470bb Mon Sep 17 00:00:00 2001 From: EriBloo <19932449+EriBloo@users.noreply.github.com> Date: Mon, 14 Oct 2024 16:34:21 +0000 Subject: [PATCH] rename variable --- src/Drivers/LaravelDriver.php | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/Drivers/LaravelDriver.php b/src/Drivers/LaravelDriver.php index 93a12de..648be3d 100644 --- a/src/Drivers/LaravelDriver.php +++ b/src/Drivers/LaravelDriver.php @@ -11,7 +11,7 @@ final class LaravelDriver implements CacheObjectDriver { public function __construct( - private readonly Store $repository, + private readonly Store $store, ) {} public function set(mixed $value, CacheObject $cacheObject): string @@ -23,9 +23,9 @@ public function set(mixed $value, CacheObject $cacheObject): string ->total('seconds'); if ($ttl <= 0) { - $this->repository->forever($key, $value); + $this->store->forever($key, $value); } else { - $this->repository->put($key, $value, $ttl); + $this->store->put($key, $value, $ttl); } return $key; @@ -34,7 +34,7 @@ public function set(mixed $value, CacheObject $cacheObject): string public function get(CacheObject $cacheObject): mixed { $key = (string) $cacheObject->key(); - $value = $this->repository->get($key); + $value = $this->store->get($key); if ($value === null) { return null; @@ -46,6 +46,6 @@ public function get(CacheObject $cacheObject): mixed public function delete(CacheObject $cacheObject): bool { - return $this->repository->forget((string) $cacheObject->key()); + return $this->store->forget((string) $cacheObject->key()); } }