示例#1
0
 public function __destruct()
 {
     //save cache to apc
     if ($this->bitSaveToCacheRequired) {
         $this->objApcCache->addValue("templateSessionCacheTemplate", $this->arrCacheTemplates, class_config::getInstance()->getConfig("templatecachetime"));
         $this->objApcCache->addValue("templateSessionCacheTemplateSections", $this->arrCacheTemplateSections, class_config::getInstance()->getConfig("templatecachetime"));
     }
 }
 function __destruct()
 {
     if ($this->bitCacheSaveRequired && class_config::getInstance()->getConfig('resourcecaching') == true) {
         class_apc_cache::getInstance()->addValue(__CLASS__ . "classes", $this->arrClassCache);
         file_put_contents($this->strObjectsCacheFile, serialize($this->arrClassCache));
     }
 }
示例#3
0
 public function __destruct()
 {
     //save texts to session
     if ($this->bitSaveToCache) {
         class_apc_cache::getInstance()->addValue("textSessionCache", $this->arrTexts, class_config::getInstance()->getConfig("textcachetime"));
         class_apc_cache::getInstance()->addValue("textSessionFallbackCache", $this->arrFallbackTextEntrys, class_config::getInstance()->getConfig("textcachetime"));
     }
 }
示例#4
0
 /**
  * internal destructor
  */
 function __destruct()
 {
     if (self::$bitCacheSaveRequired && class_config::getInstance()->getConfig('resourcecaching') == true) {
         class_apc_cache::getInstance()->addValue("reflection", self::$arrAnnotationsCache);
         file_put_contents(self::$strAnnotationsCacheFile, serialize(self::$arrAnnotationsCache));
         self::$bitCacheSaveRequired = false;
     }
 }
 /**
  * Stores the currently cached entries back to the filesystem - if required.
  */
 public function __destruct()
 {
     if ($this->bitCacheSaveRequired && class_config::getInstance()->getConfig('resourcecaching') == true) {
         class_apc_cache::getInstance()->addValue(__CLASS__ . "templates", $this->arrTemplates);
         class_apc_cache::getInstance()->addValue(__CLASS__ . "foldercontent", $this->arrFoldercontent);
         class_apc_cache::getInstance()->addValue(__CLASS__ . "langfiles", $this->arrLangfiles);
         file_put_contents($this->strTemplatesCacheFile, serialize($this->arrTemplates));
         file_put_contents($this->strFoldercontentCacheFile, serialize($this->arrFoldercontent));
         file_put_contents($this->strFoldercontentLangFile, serialize($this->arrLangfiles));
     }
 }
示例#6
0
 /**
  * Clears the apc cache
  * @return void
  */
 public function flushCache()
 {
     if (!$this->bitAPCInstalled) {
         self::$arrFallbackCache = array();
     } else {
         apc_clear_cache("user");
         apc_clear_cache();
     }
 }
示例#7
0
 /**
  * A general helper to flush the systems various caches.
  *
  * @param int $intCacheType A bitmask of caches to be flushed, e.g. class_carrier::INT_CACHE_TYPE_DBQUERIES | class_carrier::INT_CACHE_TYPE_ORMCACHE
  */
 public function flushCache($intCacheType = 0)
 {
     if ($intCacheType & self::INT_CACHE_TYPE_DBQUERIES) {
         $this->getObjDB()->flushQueryCache();
     }
     if ($intCacheType & self::INT_CACHE_TYPE_DBSTATEMENTS) {
         $this->getObjDB()->flushPreparedStatementsCache();
     }
     if ($intCacheType & self::INT_CACHE_TYPE_DBTABLES) {
         $this->getObjDB()->flushTablesCache();
     }
     if ($intCacheType & self::INT_CACHE_TYPE_ORMCACHE) {
         class_orm_rowcache::flushCache();
     }
     if ($intCacheType & self::INT_CACHE_TYPE_OBJECTFACTORY) {
         class_objectfactory::getInstance()->flushCache();
     }
     if ($intCacheType & self::INT_CACHE_TYPE_MODULES) {
         class_module_system_module::flushCache();
     }
     if ($intCacheType & self::INT_CACHE_TYPE_CLASSLOADER) {
         class_classloader::getInstance()->flushCache();
     }
     if ($intCacheType & self::INT_CACHE_TYPE_APC) {
         class_apc_cache::getInstance()->flushCache();
     }
     if ($intCacheType & self::INT_CACHE_TYPE_CHANGELOG) {
         $objChangelog = new class_module_system_changelog();
         $objChangelog->processCachedInserts();
     }
 }