Jarves\Cache\Backend\Factory::createFast PHP Method

createFast() public static method

public static createFast ( Symfony\Component\DependencyInjection\ContainerInterface $container ) : Jarves\Cache\Backend\CacheInterface
$container Symfony\Component\DependencyInjection\ContainerInterface
return Jarves\Cache\Backend\CacheInterface
    public static function createFast(ContainerInterface $container)
    {
        $service = 'jarves.cache.backend.';
        if (function_exists('apc_store')) {
            $service .= 'apc';
        } else {
            $service .= 'files';
        }
        $cacheConfig = new Cache();
        /** @var CacheInterface $instance */
        $instance = $container->get($service);
        $instance->configure($cacheConfig);
        return $instance;
    }