Example #1
0
 protected function tearDown()
 {
     $this->rediska->flushDb(true);
     foreach ($this->rediska->getConnections() as $connection) {
         $connection->disconnect();
     }
     $this->rediska = null;
 }
Example #2
0
 /**
  * Clean some cache records
  *
  * Available modes are :
  * 'all' (default)  => remove all cache entries ($tags is not used)
  * 'old'            => unsupported
  * 'matchingTag'    => unsupported
  * 'notMatchingTag' => unsupported
  * 'matchingAnyTag' => unsupported
  *
  * @param  string $mode Clean mode
  * @param  array  $tags Array of tags
  * @throws Zend_Cache_Exception
  * @return boolean True if no problem
  */
 public function clean($mode = Zend_Cache::CLEANING_MODE_ALL, $tags = array())
 {
     switch ($mode) {
         case Zend_Cache::CLEANING_MODE_ALL:
             return $this->_rediska->flushDb();
             break;
         case Zend_Cache::CLEANING_MODE_OLD:
             $this->_log("Rediska_Zend_Cache_Backend_Redis::clean() : CLEANING_MODE_OLD is unsupported by the Redis backend");
             break;
         case Zend_Cache::CLEANING_MODE_MATCHING_TAG:
         case Zend_Cache::CLEANING_MODE_NOT_MATCHING_TAG:
         case Zend_Cache::CLEANING_MODE_MATCHING_ANY_TAG:
             $this->_log(self::TAGS_UNSUPPORTED_BY_CLEAN_OF_REDIS_BACKEND);
             break;
         default:
             Zend_Cache::throwException('Invalid mode for clean() method');
             break;
     }
 }
Example #3
0
 protected function tearDown()
 {
     $this->rediska->flushDb(true);
     $this->rediska = null;
     $this->cache = null;
 }
Example #4
0
 protected function tearDown()
 {
     $this->rediska->flushDb();
     $this->rediska = null;
 }
Example #5
0
 protected function tearDown()
 {
     $this->rediska->flushDb(true);
     $this->rediska = null;
     $this->saveHandler = null;
 }
Example #6
0
 /**
  * Delete all cache entries.
  * @return  boolean
  */
 public function delete_all()
 {
     return $this->_rediska->flushDb();
 }
 /**
  * @see sfCache
  */
 public function clean($mode = sfCache::ALL)
 {
     if (sfCache::ALL === $mode) {
         $this->_rediska->flushDb();
     }
 }
Example #8
0
 public function setUp()
 {
     $rediska = new Rediska();
     $rediska->flushDb();
     Rediska_Manager::removeAll();
 }