protected function getContainerCache()
 {
     if (function_exists('apcu_exists')) {
         return new ApcuCache();
     }
     return parent::getContainerCache();
 }
Example #2
0
 /**
  * {@inheritdoc}
  * @param callable|Middleware|MiddlewareFactory $httpStack
  */
 public function __construct(array $modules = [], $environment = 'prod', $httpStack = null)
 {
     array_unshift($modules, 'stratify');
     if ($httpStack) {
         $this->addConfig(['http' => function (ContainerInterface $container) use($httpStack) {
             $treeCompiler = $container->get(TreeCompiler::class);
             return $treeCompiler->compile($httpStack);
         }]);
     }
     parent::__construct($modules, $environment);
 }