Jarves\Cache\Backend\Factory::createDistributed PHP Метод

createDistributed() публичный статический Метод

public static createDistributed ( Symfony\Component\DependencyInjection\ContainerInterface $container, JarvesConfig $jarvesConfig ) : Jarves\Cache\Backend\CacheInterface
$container Symfony\Component\DependencyInjection\ContainerInterface
$jarvesConfig Jarves\JarvesConfig
Результат Jarves\Cache\Backend\CacheInterface
    public static function createDistributed(ContainerInterface $container, JarvesConfig $jarvesConfig)
    {
        $cacheConfig = $jarvesConfig->getSystemConfig()->getCache(true);
        $service = $cacheConfig->getService();
        /** @var CacheInterface $instance */
        $instance = $container->get($service);
        $instance->configure($cacheConfig);
        return $instance;
    }