예제 #1
0
파일: Abstract.php 프로젝트: hettema/Stages
 /**
  * Replace URLs from cache
  * 
  * @return string HTML
  */
 protected function _afterCacheUrl($html)
 {
     if (App_Main::useCache('block_html')) {
         App_Main::getCacheFactory()->setUseSessionVar(false);
     }
     return $html;
 }
예제 #2
0
파일: Cache.php 프로젝트: hettema/Stages
 /**
  * Check whether to use caching is enabled for specific component
  *
  * @param string type
  * Components:
  * - config
  * - layout
  * - eav
  * - translate
  *
  * @return boolean
  */
 public function useCache($type = null)
 {
     if (is_null($this->_useCache)) {
         $data = App_Main::useCache($type);
         $this->_useCache = !empty($data) ? (array) $data : array();
     }
     if (empty($type)) {
         return $this->_useCache;
     } else {
         return isset($this->_useCache[$type]) ? (bool) $this->_useCache[$type] : false;
     }
 }