share(function(Application $app) { if ( ! file_exists(__DIR__ . '/../../../../../tmp/cache_registry.yml')) { touch(__DIR__ . '/../../../../../tmp/cache_registry.yml'); } return new CacheManager($app, new \SplFileInfo(__DIR__ . '/../../../../../tmp/cache_registry.yml')); }); $app['cache'] = $app->share(function(Application $app) { return $app['phraseanet.cache-service'] ->get('MainCache', $app['phraseanet.configuration']->getCache()) ->getDriver(); }); $app['opcode-cache'] = $app->share(function(Application $app) { return $app['phraseanet.cache-service'] ->get('OpcodeCache', $app['phraseanet.configuration']->getOpcodeCache()) ->getDriver(); }); } public function boot(Application $app) { } }