Ejemplo n.º 1
0
 public function __construct($config)
 {
     parent::__construct($config);
     // init cache filename, must be unique per live site, in case of multisite
     $liveSite = str_replace('administrator/', '', JURI::base());
     $this->_cacheFilename = 'shCacheContent.' . md5($liveSite);
     $this->_cacheFilefullpath = sh404SEF_FRONT_ABS_PATH . 'cache' . '/' . $this->_cacheFilename . '.php';
     $this->_lockFilefullpath = sh404SEF_FRONT_ABS_PATH . 'cache' . '/' . $this->_cacheFilename . '.shlock';
     // every now and then we clear the cache to let it refill with more recent data
     $this->_itsTimeToCheckTTL = mt_rand(1, SH404SEF_URL_CACHE_WRITES_TO_CHECK_TTL) == 1;
     // register method that will store urls created during
     // current page request into cache file
     if (!empty($this->_config->shUseURLCache)) {
         register_shutdown_function(array($this, 'writeURLCacheToDisk'));
     }
 }
Ejemplo n.º 2
0
 public function __construct($config)
 {
     parent::__construct($config);
     self::$_livesite = md5(str_replace('administrator/', '', JURI::base()));
 }