public static getCacheProvider ( $type, $configuration, $namespace = null, $providers = [] ) : |
||
$type | ||
$namespace | ||
리턴 |
/** * Initializes cache. Defaults to Array cache. * * @return \Doctrine\Common\Cache\CacheProvider * @throws \Exception * @throws \Symfony\Component\Debug\Exception\ClassNotFoundException */ protected function createCache() { if (is_null(config('doctrine.cache.provider'))) { return null; } $cacheProvider = config('doctrine.cache.provider'); $supportedProviders = config('doctrine.cache.providers', []); $cacheConfiguration = config('doctrine.cache.' . $cacheProvider); $namespace = config('doctrine.cache.namespace', config('cache.prefix')); CacheFactory::setProviders($supportedProviders); return CacheFactory::getCacheProvider($cacheProvider, $cacheConfiguration, $namespace); }