original_string: public function flush() {
          if (!$this->key_prefix) {
              return ($this->redis->flushdb()  == 'OK');
          }
          switch($this->key_prefix_flush_method) {
              case 'direct':
                  $this->redis->flushByPrefix($this->key_prefix);
                  return true;
              case 'event':
                  jEvent::notify('jCacheRedisFlushKeyPrefix', array('prefix'=>$this->key_prefix,
                                                                    'profile' =>$this->profileName));
                  return true;
              case 'jcacheredisworker':
                  $this->redis->rpush('jcacheredisdelkeys', $this->key_prefix);
                  return true;
          }
          return false;
      }
code: public function flush() {
          if (!$this->key_prefix) {
              return ($this->redis->flushdb()  == 'OK');
          }
          switch($this->key_prefix_flush_method) {
              case 'direct':
                  $this->redis->flushByPrefix($this->key_prefix);
                  return true;
              case 'event':
                  jEvent::notify('jCacheRedisFlushKeyPrefix', array('prefix'=>$this->key_prefix,
                                                                    'profile' =>$this->profileName));
                  return true;
              case 'jcacheredisworker':
                  $this->redis->rpush('jcacheredisdelkeys', $this->key_prefix);
                  return true;
          }
          return false;
      }
code_tokens: public function flush ( ) { if ( ! $ this -> key_prefix ) { return ( $ this -> redis -> flushdb ( ) == 'OK' ) ; } switch ( $ this -> key_prefix_flush_method ) { case 'direct' : $ this -> redis -> flushByPrefix ( $ this -> key_prefix ) ; return true ; case 'event' : jEvent :: notify ( 'jCacheRedisFlushKeyPrefix' , array ( 'prefix' => $ this -> key_prefix , 'profile' => $ this -> profileName ) ) ; return true ; case 'jcacheredisworker' : $ this -> redis -> rpush ( 'jcacheredisdelkeys' , $ this -> key_prefix ) ; return true ; } return false ; }
docstring: clear all data in the cache.
  
  If key_prefix is set, only keys with that prefix will be removed.
  Note that in that case, it can result in a huge performance issue.
  See key_prefix_flush_method to configure the best method for your
  app and your server.
  @return boolean       false if failure
docstring_tokens: clear all data in the cache .