private function clearCache($key)
    {
        $allowedCacheKeys = [
            self::CACHE_KEY_CSS,
            self::CACHE_KEY_SELECTOR,
            self::CACHE_KEY_XPATH,
            self::CACHE_KEY_CSS_DECLARATIONS_BLOCK,
            self::CACHE_KEY_COMBINED_STYLES,
        ];
        if (!in_array($key, $allowedCacheKeys, true)) {
            throw new \InvalidArgumentException('Invalid cache key: ' . $key, 1391822035);
        }

        $this->caches[$key] = [];
    }
private function clearCache($key)
    {
        $allowedCacheKeys = [
            self::CACHE_KEY_CSS,
            self::CACHE_KEY_SELECTOR,
            self::CACHE_KEY_XPATH,
            self::CACHE_KEY_CSS_DECLARATIONS_BLOCK,
            self::CACHE_KEY_COMBINED_STYLES,
        ];
        if (!in_array($key, $allowedCacheKeys, true)) {
            throw new \InvalidArgumentException('Invalid cache key: ' . $key, 1391822035);
        }

        $this->caches[$key] = [];
    }
private function clearCache ( $ key ) { $ allowedCacheKeys = [ self :: CACHE_KEY_CSS , self :: CACHE_KEY_SELECTOR , self :: CACHE_KEY_XPATH , self :: CACHE_KEY_CSS_DECLARATIONS_BLOCK , self :: CACHE_KEY_COMBINED_STYLES , ] ; if ( ! in_array ( $ key , $ allowedCacheKeys , true ) ) { throw new \ InvalidArgumentException ( 'Invalid cache key: ' . $ key , 1391822035 ) ; } $ this -> caches [ $ key ] = [ ] ; }
Clears a single cache by key.

@param int $key the cache key, must be CACHE_KEY_CSS, CACHE_KEY_SELECTOR, CACHE_KEY_XPATH
or CACHE_KEY_CSS_DECLARATION_BLOCK

@return void

@throws \InvalidArgumentException
Clears a single cache by key .