Exemple #1
0
 /**
  * Clears all set cache data
  *
  * @param string $tag Tag to clear when the default tag name is not used
  * @return void
  */
 public static function clearCache($tag = null)
 {
     if (self::$_cacheTags) {
         if ($tag == null) {
             $tag = 'Zend_Translate';
         }
         self::$_cache->clean(\Zend\Cache\Cache::CLEANING_MODE_MATCHING_TAG, array($tag));
     } else {
         self::$_cache->clean(\Zend\Cache\Cache::CLEANING_MODE_ALL);
     }
 }
Exemple #2
0
 /**
  * Object destructor
  *
  * Clean up backend storage
  */
 public function __destruct()
 {
     if ($this->_cache !== null) {
         $this->_cache->clean(Cache\Cache::CLEANING_MODE_MATCHING_TAG, $this->_tags);
     }
 }
Exemple #3
0
 public function tearDown()
 {
     $this->_cache->clean(Cache::CLEANING_MODE_ALL);
     $this->_cache = null;
 }