From 5095ad3e20f69681ea4d9d978744bf25923db238 Mon Sep 17 00:00:00 2001 From: Alex Renoki Date: Tue, 7 Dec 2021 16:45:00 +0200 Subject: [PATCH] Removed cacheTime for cacheFor --- src/Traits/QueryCacheModule.php | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/Traits/QueryCacheModule.php b/src/Traits/QueryCacheModule.php index 2fd6ce8..79caa36 100644 --- a/src/Traits/QueryCacheModule.php +++ b/src/Traits/QueryCacheModule.php @@ -13,7 +13,7 @@ trait QueryCacheModule * * @var int|\DateTime */ - protected $cacheTime; + protected $cacheFor; /** * The tags for the query cache. Can be useful @@ -78,7 +78,7 @@ public function getFromQueryCache(string $method = 'get', array $columns = ['*'] $key = $this->getCacheKey($method); $cache = $this->getCache(); $callback = $this->getQueryCacheCallback($method, $columns, $id); - $time = $this->getCacheTime(); + $time = $this->getCacheFor(); if ($time instanceof DateTime || $time > 0) { return $cache->remember($key, $time, $callback); @@ -209,7 +209,7 @@ public function flushQueryCacheWithTag(string $tag): bool */ public function cacheFor($time) { - $this->cacheTime = $time; + $this->cacheFor = $time; $this->avoidCache = $time === null; return $this; @@ -385,9 +385,9 @@ public function shouldUsePlainKey(): bool * * @return int|\DateTime */ - public function getCacheTime() + public function getCacheFor() { - return $this->cacheTime; + return $this->cacheFor; } /**