Example #1
0
 protected static function getComponentsMapping()
 {
     if (!self::$aaComponentsMapping) {
         $bCacheAvailableComponentsEnabled = self::globalCfgCacheComponentsEnabled();
         try {
             //load available components mapping
             if (!$bCacheAvailableComponentsEnabled) {
                 throw new AnwCacheNotFoundException();
             }
             self::$aaComponentsMapping = AnwCache_componentsMapping::getCachedComponentsMapping();
             AnwDebug::log("Loading available components mapping from cache");
         } catch (AnwException $e) {
             //generate new mapping
             AnwDebug::log("Generating available components mapping");
             self::$aaComponentsMapping = self::generateComponentsMapping();
             if ($bCacheAvailableComponentsEnabled) {
                 AnwCache_componentsMapping::putCachedComponentsMapping(self::$aaComponentsMapping);
             }
         }
     }
     return self::$aaComponentsMapping;
 }
Example #2
0
 protected function refreshComponentsList()
 {
     AnwCache_componentsMapping::clearCache();
     $this->redirectInfo($this->linkMe(), $this->t_("refreshcomponents_redirect_title"), $this->t_("refreshcomponents_redirect_info"));
 }