Skip to content

Instantly share code, notes, and snippets.

@caefer
Created November 15, 2011 05:56
Show Gist options
  • Save caefer/1366289 to your computer and use it in GitHub Desktop.
Save caefer/1366289 to your computer and use it in GitHub Desktop.
<?php
// web/index.php
require_once __DIR__.'/../app/bootstrap.php.cache';
require_once __DIR__.'/../app/AppKernel.php';
use Symfony\Component\HttpFoundation\Request;
use Caefer\StaticKernel\StaticCache; // or whatever name and namespace it would have..
$kernel = new AppKernel('prod', false);
$kernel->loadClassCache();
// wrap the default AppKernel with the StaticCache one
$kernel = new StaticCache($kernel);
$kernel->handle(Request::createFromGlobals())->send(); // send the raw response after writing it to disk
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment