@param null|\Doctrine\Common\Cache\Cache $cacheProvider

@return $this
546563
public function setCacheProvider(\Doctrine\Common\Cache\Cache $cacheProvider = null)
    {
        $this->cacheProvider = $cacheProvider;

        return $this;
    }
1081883
public function setCoreCacheDefault($value)
    {
        $this->setFieldName('cache_default');
        $this->loadObject(true);
        $this->setFieldValue($value);

        return $this;
    }
575494
public static function with(
            string $authenticationProvider,
            string $authorizationProvider = null
    ): self {
        return new self($authenticationProvider, $authorizationProvider);
    }
1266610
public static function createProxyGenerator(
        CacheHandlerInterface $cacheHandler,
        Configuration $proxyConfig = null,
        Reader $annotationReader = null
    ) : ProxyGenerator {
        $proxyConfig = $proxyConfig ?? new Configuration();
        $annotationReader = $annotationReader ?? new AnnotationReader();
        $proxyFactory = new AccessInterceptorValueHolderFactory($proxyConfig);

        return new ProxyGenerator($proxyFactory, $annotationReader, $cacheHandler);
    }
958369
public function addRuleProvider(RuleProvider $provider)
    {
        $this->loaded && $this->loaded->__invoke();

        $this->ruleProviders[] = $provider;

        return $this;
    }
458731
public function setCache($cache, $namespace = null)
    {
        if($cache && ObjectRegistryCache::isSupported())
        {
            $this->__registry = new ObjectRegistryCache();

            if($namespace) {
                $this->__registry->setNamespace($namespace);
            }
        }
        else
        {
            if(!$this->__registry instanceof ObjectRegistry) {
                $this->__registry = new ObjectRegistry();
            }
        }

        return $this;
    }
1288942
public function remember($seconds = null, CacheInterface $cache = null)
	{
		if (is_null($cache))
		{
			// use the built in cache interface
			$cache = new Cache;
		}
		$this->cache    = $cache;
		$this->remember = $seconds;

		return $this;
	}
1259337
private function registerCache(ContainerBuilder $container): self
    {
        $container->register('contentful.delivery.cache_clearer', CacheClearer::class)
            ->setAbstract(\true)
        ;

        $container->register('contentful.delivery.cache_warmer', CacheWarmer::class)
            ->setAbstract(\true)
        ;

        return $this;
    }
275568
public function remember($seconds = null, CacheInterface $cache = null)
	{
		if (is_null($cache))
		{
			// use the built in cache interface
			$cache = new Cache;
		}
		$this->cache = $cache;
		if (is_null($seconds))
		{
			$this->seconds = $this->defaultRemember;
		}
		else
		{
			$this->seconds = $seconds;
		}

		return $this;
	}
1012439
public function addCache(CacheItemPoolInterface $cachePool, array $config = [])
    {
        if (!isset($config['cache_key_generator'])) {
            $config['cache_key_generator'] = new HeaderCacheKeyGenerator(['Authorization', 'Cookie', 'Accept', 'Content-type']);
        }
        $this->cachePlugin = Plugin\CachePlugin::clientCache($cachePool, $this->streamFactory, $config);
        $this->httpClientModified = true;
    }
71051
public function setCacheAdapter($cacheAdapter)
    {
        if (is_null($cacheAdapter) || ! $cacheAdapter instanceof CacheAdapter) {
            return false;
        }

        $this->cacheAdapter = $cacheAdapter;

        return true;
    }
435322
public static function createFrom(
        Storage $persistenceProvider,
        Storage $cacheProvider,
        LoggerInterface $logger = null
    ) {
        /** @var $userAgentHandlerChain \Wurfl\Handlers\Chain\UserAgentHandlerChain */
        $userAgentHandlerChain = $cacheProvider->load('UserAgentHandlerChain');

        if (!($userAgentHandlerChain instanceof UserAgentHandlerChain)) {
            $userAgentHandlerChain = self::init();
            $cacheProvider->save('UserAgentHandlerChain', $userAgentHandlerChain, 3600);
        }

        $userAgentHandlerChain->setLogger($logger);

        foreach ($userAgentHandlerChain->getHandlers() as $handler) {
            /* @var $handler \Wurfl\Handlers\AbstractHandler */
            $handler
                ->setLogger($logger)
                ->setPersistenceProvider($persistenceProvider);
        }

        return $userAgentHandlerChain;
    }
433276
public function getCachePool(ConfigResolverInterface $configResolver)
    {
        /** @var \Symfony\Component\Cache\Adapter\AdapterInterface $cacheService */
        $cacheService = $this->container->get($configResolver->getParameter('cache_service_name'));

        // If cache service is already implementing TagAwareAdapterInterface, return as-is
        if ($cacheService instanceof TagAwareAdapterInterface) {
            return $cacheService;
        }

        return new TagAwareAdapter(
            $cacheService
        );
    }
241270
public function useCache($caching = null)
    {
        if (is_null($caching)) {
            return ($this->useCache && $this->getCache());
        }

        $this->useCache = (bool) $caching;

        return $this;
    }
898132
public function cache($seconds = null)
    {
        if ($seconds === null) {
            $this->cacheTime = $this->defaultCacheTime;
        } elseif ($seconds === false) {
            $this->cacheTime = false;
        } else {
            $this->cacheTime = (int)$seconds;
        }
        return $this;
    }
618412
public function addProvider(PathProviderInterface $provider, $priority = 0)
    {
        $this->providers[$priority][] = $provider;
        $this->sorted                 = null;
    }
105455
public function cacheControl($cacheControl)
    {
        if (!($cacheControl instanceof CacheControl)) {
            $cacheControl = RequestCacheControl::fromString($cacheControl);
        }

        $this->cacheControl = $cacheControl;

        return $this;
    }