Using remember helper function

parent aab7a4c6
...@@ -26,15 +26,9 @@ class CacheUserTokenDecorator extends BaseCacheDecorator implements UserTokenRep ...@@ -26,15 +26,9 @@ class CacheUserTokenDecorator extends BaseCacheDecorator implements UserTokenRep
*/ */
public function allForUser($userId) public function allForUser($userId)
{ {
return $this->cache $this->remember(function () use ($userId) {
->tags([$this->entityName, 'global'])
->remember(
"{$this->locale}.{$this->entityName}.allForUser.{$userId}",
$this->cacheTime,
function () use ($userId) {
return $this->repository->allForUser($userId); return $this->repository->allForUser($userId);
} });
);
} }
/** /**
......
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>CacheUserTokenDecorator</code> class
"3.2.0": "3.2.0":
added: added:
- Role views (index, create, edit) have been converted to VueJS components, as a SPA - Role views (index, create, edit) have been converted to VueJS components, as a SPA
......
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