@@ -405,7 +405,7 @@ |
||
405 | 405 | $model = $this->getModel(); |
406 | 406 | |
407 | 407 | if ($model && $model->caching_time && $model->caching_time > 0) { |
408 | - return $model->caching_time; |
|
408 | + return $model->caching_time; |
|
409 | 409 | } |
410 | 410 | |
411 | 411 | $cachingTime = Container::getInstance() |
@@ -52,11 +52,11 @@ |
||
52 | 52 | $class = get_called_class(); |
53 | 53 | $instance = new $class; |
54 | 54 | |
55 | - return parent::all($columns); |
|
55 | + return parent::all($columns); |
|
56 | 56 | |
57 | - if (!$instance->isCachable()) { |
|
58 | - return parent::all($columns); |
|
59 | - } |
|
57 | + if (!$instance->isCachable()) { |
|
58 | + return parent::all($columns); |
|
59 | + } |
|
60 | 60 | |
61 | 61 | $tags = $instance->makeCacheTags(); |
62 | 62 | $key = $instance->makeCacheKey(); |
@@ -295,17 +295,17 @@ |
||
295 | 295 | $seconds = $this->getCachingTime(); |
296 | 296 | |
297 | 297 | if ($seconds > 0) { |
298 | - return $this->cache($cacheTags) |
|
299 | - ->remember( |
|
300 | - $hashedCacheKey, |
|
301 | - $seconds, |
|
302 | - function () use ($arguments, $cacheKey, $method) { |
|
303 | - return [ |
|
304 | - "key" => $cacheKey, |
|
305 | - "value" => parent::{$method}(...$arguments), |
|
306 | - ]; |
|
307 | - } |
|
308 | - ); |
|
298 | + return $this->cache($cacheTags) |
|
299 | + ->remember( |
|
300 | + $hashedCacheKey, |
|
301 | + $seconds, |
|
302 | + function () use ($arguments, $cacheKey, $method) { |
|
303 | + return [ |
|
304 | + "key" => $cacheKey, |
|
305 | + "value" => parent::{$method}(...$arguments), |
|
306 | + ]; |
|
307 | + } |
|
308 | + ); |
|
309 | 309 | } |
310 | 310 | |
311 | 311 | return $this->cache($cacheTags) |
@@ -39,7 +39,7 @@ |
||
39 | 39 | protected function flushModelCache(string $option) : int |
40 | 40 | { |
41 | 41 | if (substr($option, 0, 9) == 'AppModels') { |
42 | - $option = 'App\Models\\' . substr($option, 9); |
|
42 | + $option = 'App\Models\\' . substr($option, 9); |
|
43 | 43 | } |
44 | 44 | |
45 | 45 | $model = new $option; |