private function _setCacheStrategy(string $cacheStrategy) : void
    {
        $cacheStrategyClassName = self::CACHE_STRATEGIES[$cacheStrategy] ?? $cacheStrategy;

        if (!InterfaceHelper::implementsInterface($cacheStrategyClassName, CacheStrategy::class))
        {
            throw new UnknownCacheStrategyException($cacheStrategyClassName, \array_values(self::CACHE_STRATEGIES));
        }

        $this->_cacheStrategy = new $cacheStrategyClassName($this->_storage);
    }
private function _setCacheStrategy(string $cacheStrategy) : void
    {
        $cacheStrategyClassName = self::CACHE_STRATEGIES[$cacheStrategy] ?? $cacheStrategy;

        if (!InterfaceHelper::implementsInterface($cacheStrategyClassName, CacheStrategy::class))
        {
            throw new UnknownCacheStrategyException($cacheStrategyClassName, \array_values(self::CACHE_STRATEGIES));
        }

        $this->_cacheStrategy = new $cacheStrategyClassName($this->_storage);
    }
private function _setCacheStrategy ( string $ cacheStrategy ) : void { $ cacheStrategyClassName = self :: CACHE_STRATEGIES [ $ cacheStrategy ] ?? $ cacheStrategy ; if ( ! InterfaceHelper :: implementsInterface ( $ cacheStrategyClassName , CacheStrategy :: class ) ) { throw new UnknownCacheStrategyException ( $ cacheStrategyClassName , \ array_values ( self :: CACHE_STRATEGIES ) ) ; } $ this -> _cacheStrategy = new $ cacheStrategyClassName ( $ this -> _storage ) ; }
Sets the caching strategy for this rule set.
@param string $cacheStrategy
@throws \hamburgscleanest\GuzzleAdvancedThrottle\Exceptions\UnknownCacheStrategyException
Sets the caching strategy for this rule set .