Using new remember function in cache decorator

parent c7c3b472
...@@ -21,14 +21,8 @@ class CacheTagDecorator extends BaseCacheDecorator implements TagRepository ...@@ -21,14 +21,8 @@ class CacheTagDecorator extends BaseCacheDecorator implements TagRepository
*/ */
public function allForNamespace($namespace) public function allForNamespace($namespace)
{ {
return $this->cache return $this->remember(function () use($namespace) {
->tags([$this->entityName, 'global']) return $this->repository->allForNamespace($namespace);
->remember( });
"{$this->locale}.{$this->entityName}.allForNamespace.{$namespace}",
$this->cacheTime,
function () use ($namespace) {
return $this->repository->allForNamespace($namespace);
}
);
} }
} }
url: https://github.com/AsgardCms/Platform url: https://github.com/AsgardCms/Platform
versions: versions:
"3.4.0@unreleased":
changed:
- Using new <code>remember</code> method in the <code>CacheTagDecorator</code>
"3.0.0": "3.0.0":
added: added:
- Created a vue component for the tags input - Created a vue component for the tags input
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment