22 $cache = Cache::createInstance();
23 $cacheId = $this->getCacheId(
$userId);
25 if ($cache->initCache(self::TTL, $cacheId, self::PATH))
27 $jobs = $cache->getVars();
33 return JobCollection::mapFromArray($jobs);
51 if (empty($sortedByUserJobs))
56 $cache = Cache::createInstance();
58 foreach ($sortedByUserJobs as
$userId => $jobs)
61 $cacheId = $this->getCacheId(
$userId);
63 $cache->startDataCache(self::TTL, $cacheId, self::PATH);
64 $this->registerCollabTags($cacheId, $jobs);
65 $cache->endDataCache($jobs->toArray());