Using remember helper function

parent aab7a4c6
......@@ -26,15 +26,9 @@ class CacheUserTokenDecorator extends BaseCacheDecorator implements UserTokenRep
*/
public function allForUser($userId)
{
return $this->cache
->tags([$this->entityName, 'global'])
->remember(
"{$this->locale}.{$this->entityName}.allForUser.{$userId}",
$this->cacheTime,
function () use ($userId) {
return $this->repository->allForUser($userId);
}
);
$this->remember(function () use ($userId) {
return $this->repository->allForUser($userId);
});
}
/**
......
url: https://github.com/AsgardCms/Platform
versions:
"3.4.0@unreleased":
changed:
- Using new <code>remember</code> method in the <code>CacheUserTokenDecorator</code> class
"3.2.0":
added:
- 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