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;
    }