public function clean($mode = Zend_Cache::CLEANING_MODE_ALL, $tags = array())
    {
        if( $tags && ! is_array($tags)) {
            $tags = array($tags);
        }
        $result = true;
        switch ($mode) {
            case Zend_Cache::CLEANING_MODE_ALL:
                $this->_removeIds($this->getIds());
                break;

            case Zend_Cache::CLEANING_MODE_OLD:
                break;

            case Zend_Cache::CLEANING_MODE_MATCHING_TAG:
                $this->_removeIdsByMatchingTags($tags);
                break;

            case Zend_Cache::CLEANING_MODE_NOT_MATCHING_TAG:
                $this->_removeIdsByNotMatchingTags($tags);
                break;

            case Zend_Cache::CLEANING_MODE_MATCHING_ANY_TAG:
                $this->_removeIdsByMatchingAnyTags($tags);
                break;

            default:
                Zend_Cache::throwException('Invalid mode for clean() method: '.$mode);
        }
        return $this->_collectGarbage();
    }