Beispiel #1
0
 public function getStructure()
 {
     $cacheId = AuthManager::isAuthorized() ? 'a' : 'na' . '_structure';
     $structure = PSCache::POSTS()->getFromCache($cacheId);
     if (!is_array($structure)) {
         PsProfiler::inst(__CLASS__)->start('Build structure');
         $structure = $this->getStructureImpl()->toArray();
         PsProfiler::inst(__CLASS__)->stop();
         PSCache::POSTS()->saveToCache($structure, $cacheId);
     }
     return $structure;
 }
Beispiel #2
0
 protected function cacheGroup()
 {
     return PSCache::POSTS();
 }