Example #1
0
 /**
  * Sets a reference to the cache frontend which uses this backend and
  * initializes the default cache directory.
  *
  * This method also detects if this backend is frozen and sets the internal
  * flag accordingly.
  *
  * TYPO3 v4 note: This method is different between TYPO3 v4 and FLOW3
  * because the Environment class to get the path to a temporary directory
  * does not exist in v4.
  *
  * @param \TYPO3\CMS\Core\Cache\Frontend\FrontendInterface $cache The cache frontend
  * @return void
  */
 public function setCache(\TYPO3\CMS\Core\Cache\Frontend\FrontendInterface $cache)
 {
     parent::setCache($cache);
     if (file_exists($this->cacheDirectory . 'FrozenCache.data')) {
         $this->frozen = TRUE;
         if ($this->useIgBinary === TRUE) {
             $this->cacheEntryIdentifiers = igbinary_unserialize(file_get_contents($this->cacheDirectory . 'FrozenCache.data'));
         } else {
             $this->cacheEntryIdentifiers = unserialize(file_get_contents($this->cacheDirectory . 'FrozenCache.data'));
         }
     }
 }
Example #2
0
 /**
  * Removes all cache entries of this cache and sets the frozen flag to FALSE.
  *
  * @return void
  * @api
  */
 public function flush()
 {
     parent::flush();
     if ($this->frozen === TRUE) {
         $this->frozen = FALSE;
     }
 }
 /**
  * Removes all cache entries of this cache and sets the frozen flag to FALSE.
  *
  * @return void
  * @api
  */
 public function flush()
 {
     parent::flush();
     if ($this->frozen === true) {
         $this->frozen = false;
     }
 }