瀏覽代碼

Clean up app.php

Jordi Boggiano 9 年之前
父節點
當前提交
28ea38e7c9
共有 1 個文件被更改,包括 3 次插入7 次删除
  1. 3 7
      web/app.php

+ 3 - 7
web/app.php

@@ -5,23 +5,19 @@ ini_set('date.timezone', 'UTC');
 use Symfony\Component\ClassLoader\ApcClassLoader;
 use Symfony\Component\HttpFoundation\Request;
 
-$loader = require_once __DIR__.'/../app/bootstrap.php.cache';
+$loader = include __DIR__.'/../app/bootstrap.php.cache';
 
 // Use APC for autoloading to improve performance.
-// Change 'sf2' to a unique prefix in order to prevent cache key conflicts
-// with other applications also using APC.
 if (function_exists('apc_store')) {
-    $apcLoader = new ApcClassLoader('packagist', $loader);
+    $apcLoader = new ApcClassLoader(sha1(__FILE__), $loader);
     $loader->unregister();
     $apcLoader->register(true);
 }
 
-require_once __DIR__.'/../app/AppKernel.php';
-//require_once __DIR__.'/../app/AppCache.php';
+include __DIR__.'/../app/AppKernel.php';
 
 $kernel = new AppKernel('prod', false);
 $kernel->loadClassCache();
-//$kernel = new AppCache($kernel);
 $request = Request::createFromGlobals();
 $response = $kernel->handle($request);
 $response->send();