public function isValidCache($cache)
    {
        // Get the valid caches
        $caches = $this->getCaches();
        $cacheKeys = array_keys($caches);
        $cacheKeys[] = 'all';

        if (!in_array($cache, array_values($cacheKeys))) {
            return false;
        }

        return $cache;
    }
public function isValidCache($cache)
    {
        // Get the valid caches
        $caches = $this->getCaches();
        $cacheKeys = array_keys($caches);
        $cacheKeys[] = 'all';

        if (!in_array($cache, array_values($cacheKeys))) {
            return false;
        }

        return $cache;
    }
public function isValidCache ( $ cache ) { // Get the valid caches $ caches = $ this -> getCaches ( ) ; $ cacheKeys = array_keys ( $ caches ) ; $ cacheKeys [ ] = 'all' ; if ( ! in_array ( $ cache , array_values ( $ cacheKeys ) ) ) { return false ; } return $ cache ; }
Validate if a string is a valid cache.

@param string $cache The cache name

@return mixed The cache name if valid or FALSE if not valid
Validate if a string is a valid cache .