| @@ 22-31 (lines=10) @@ | ||
| 19 | * @param string $lang |
|
| 20 | * @return object |
|
| 21 | */ |
|
| 22 | public function allOnlineInLang($lang) |
|
| 23 | { |
|
| 24 | return $this->cache |
|
| 25 | ->tags([$this->entityName, 'global']) |
|
| 26 | ->remember( |
|
| 27 | "{$this->locale}.{$this->entityName}.allOnlineInLang", |
|
| 28 | $this->cacheTime, |
|
| 29 | function () use ($lang) { |
|
| 30 | return $this->repository->allOnlineInLang($lang); |
|
| 31 | } |
|
| 32 | ); |
|
| 33 | } |
|
| 34 | ||
| @@ 40-49 (lines=10) @@ | ||
| 37 | * @param string $name |
|
| 38 | * @return string |
|
| 39 | */ |
|
| 40 | public function get($name) |
|
| 41 | { |
|
| 42 | return $this->cache |
|
| 43 | ->tags([$this->entityName, 'global']) |
|
| 44 | ->remember( |
|
| 45 | "{$this->locale}.{$this->entityName}.get.{$name}", |
|
| 46 | $this->cacheTime, |
|
| 47 | function () use ($name) { |
|
| 48 | return $this->repository->get($name); |
|
| 49 | } |
|
| 50 | ); |
|
| 51 | } |
|
| 52 | } |
|