public static function _clear()
    {
        if (self::getBackend() == 'memcache') {
            if (!Kwf_Config::getValue('cacheSimpleNamespace')) {
                //increment namespace
                $mc = Kwf_Cache_Simple::getMemcache();
                if ($mc->get(Kwf_Cache_Simple::$uniquePrefix.'cache_namespace')) {
                    $mc->increment(Kwf_Cache_Simple::$uniquePrefix.'cache_namespace');
                }
            } else {
                $mc = Kwf_Cache_Simple::getMemcache();
                $mc->flush();
            }
        } else if (self::getBackend() == 'redis') {
            $prefixLength = strlen(self::getRedis()->_prefix(''));
            $it = null;
            while ($keys = self::getRedis()->scan($it, self::getRedis()->_prefix('simple:*'))) {
                foreach ($keys as $k=>$i) {
                    $keys[$k] = substr($i, $prefixLength);
                }
                self::getRedis()->delete($keys);
            }
        } else if (self::getBackend() == 'file') {
            foreach(glob('cache/simple/*') as $i) {
                unlink($i);
            }
        } else if (self::getBackend() == 'apc' || self::getBackend() == 'apcu') {
            //those are cleared using their own clear-cache type
        } else {
            if (!isset(self::$_zendCache)) self::getZendCache();
            $r = self::$_zendCache->clean(Zend_Cache::CLEANING_MODE_ALL);
        }
    }
public static function _clear()
    {
        if (self::getBackend() == 'memcache') {
            if (!Kwf_Config::getValue('cacheSimpleNamespace')) {
                //increment namespace
                $mc = Kwf_Cache_Simple::getMemcache();
                if ($mc->get(Kwf_Cache_Simple::$uniquePrefix.'cache_namespace')) {
                    $mc->increment(Kwf_Cache_Simple::$uniquePrefix.'cache_namespace');
                }
            } else {
                $mc = Kwf_Cache_Simple::getMemcache();
                $mc->flush();
            }
        } else if (self::getBackend() == 'redis') {
            $prefixLength = strlen(self::getRedis()->_prefix(''));
            $it = null;
            while ($keys = self::getRedis()->scan($it, self::getRedis()->_prefix('simple:*'))) {
                foreach ($keys as $k=>$i) {
                    $keys[$k] = substr($i, $prefixLength);
                }
                self::getRedis()->delete($keys);
            }
        } else if (self::getBackend() == 'file') {
            foreach(glob('cache/simple/*') as $i) {
                unlink($i);
            }
        } else if (self::getBackend() == 'apc' || self::getBackend() == 'apcu') {
            //those are cleared using their own clear-cache type
        } else {
            if (!isset(self::$_zendCache)) self::getZendCache();
            $r = self::$_zendCache->clean(Zend_Cache::CLEANING_MODE_ALL);
        }
    }
public static function _clear ( ) { if ( self :: getBackend ( ) == 'memcache' ) { if ( ! Kwf_Config :: getValue ( 'cacheSimpleNamespace' ) ) { //increment namespace $ mc = Kwf_Cache_Simple :: getMemcache ( ) ; if ( $ mc -> get ( Kwf_Cache_Simple :: $ uniquePrefix . 'cache_namespace' ) ) { $ mc -> increment ( Kwf_Cache_Simple :: $ uniquePrefix . 'cache_namespace' ) ; } } else { $ mc = Kwf_Cache_Simple :: getMemcache ( ) ; $ mc -> flush ( ) ; } } else if ( self :: getBackend ( ) == 'redis' ) { $ prefixLength = strlen ( self :: getRedis ( ) -> _prefix ( '' ) ) ; $ it = null ; while ( $ keys = self :: getRedis ( ) -> scan ( $ it , self :: getRedis ( ) -> _prefix ( 'simple:*' ) ) ) { foreach ( $ keys as $ k => $ i ) { $ keys [ $ k ] = substr ( $ i , $ prefixLength ) ; } self :: getRedis ( ) -> delete ( $ keys ) ; } } else if ( self :: getBackend ( ) == 'file' ) { foreach ( glob ( 'cache/simple/*' ) as $ i ) { unlink ( $ i ) ; } } else if ( self :: getBackend ( ) == 'apc' || self :: getBackend ( ) == 'apcu' ) { //those are cleared using their own clear-cache type } else { if ( ! isset ( self :: $ _zendCache ) ) self :: getZendCache ( ) ; $ r = self :: $ _zendCache -> clean ( Zend_Cache :: CLEANING_MODE_ALL ) ; } }
only call from Kwf_Util_ClearCache_Types_SimpleCache!
only call from Kwf_Util_ClearCache_Types_SimpleCache!