Skip to content

Commit 5095ad3

Browse files
committed
Removed cacheTime for cacheFor
1 parent 7600f49 commit 5095ad3

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

src/Traits/QueryCacheModule.php

+5-5
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ trait QueryCacheModule
1313
*
1414
* @var int|\DateTime
1515
*/
16-
protected $cacheTime;
16+
protected $cacheFor;
1717

1818
/**
1919
* The tags for the query cache. Can be useful
@@ -78,7 +78,7 @@ public function getFromQueryCache(string $method = 'get', array $columns = ['*']
7878
$key = $this->getCacheKey($method);
7979
$cache = $this->getCache();
8080
$callback = $this->getQueryCacheCallback($method, $columns, $id);
81-
$time = $this->getCacheTime();
81+
$time = $this->getCacheFor();
8282

8383
if ($time instanceof DateTime || $time > 0) {
8484
return $cache->remember($key, $time, $callback);
@@ -209,7 +209,7 @@ public function flushQueryCacheWithTag(string $tag): bool
209209
*/
210210
public function cacheFor($time)
211211
{
212-
$this->cacheTime = $time;
212+
$this->cacheFor = $time;
213213
$this->avoidCache = $time === null;
214214

215215
return $this;
@@ -385,9 +385,9 @@ public function shouldUsePlainKey(): bool
385385
*
386386
* @return int|\DateTime
387387
*/
388-
public function getCacheTime()
388+
public function getCacheFor()
389389
{
390-
return $this->cacheTime;
390+
return $this->cacheFor;
391391
}
392392

393393
/**

0 commit comments

Comments
 (0)