share(function () { return new Compiler(); }); $app['phraseanet.cache-factory'] = $app->share(function () { return new Factory(); }); $app['phraseanet.cache-service'] = $app->share(function(Application $app) { return new CacheManager( $app['phraseanet.cache-compiler'], $app['phraseanet.cache-registry'], $app['monolog'], $app['phraseanet.cache-factory'] ); }); $app['cache'] = $app->share(function(Application $app) { $conf = $app['phraseanet.configuration']['main']['cache']; return $app['phraseanet.cache-service']->factory('cache', $conf['type'], $conf['options']); }); $app['opcode-cache'] = $app->share(function(Application $app) { $conf = $app['phraseanet.configuration']['main']['opcodecache']; return $app['phraseanet.cache-service']->factory('cache', $conf['type'], $conf['options']); }); } public function boot(Application $app) { } }