Exemplo n.º 1
0
 function &_getCache($topicId)
 {
     $cache =& Registry::get('helpTopicCache', true, null);
     $locale = PKPHelp::getLocale();
     if (!isset($cache[$locale][$topicId])) {
         $help =& PKPHelp::getHelp();
         $cacheManager =& CacheManager::getManager();
         $cache[$locale][$topicId] = $cacheManager->getFileCache('help-topic-' . $locale, $topicId, array($this, '_cacheMiss'));
         // Check to see if the cache info is outdated.
         $cacheTime = $cache[$locale][$topicId]->getCacheTime();
         if ($cacheTime !== null && $cacheTime < filemtime($this->getFilename($topicId))) {
             // The cached data is out of date.
             $cache[$locale][$topicId]->flush();
         }
     }
     return $cache[$locale][$topicId];
 }