Symfony2 on DEV Caching Issue

Written by Arvind

I’ve been having a caching issue in Symfony for the last couple of days now. I know I messed up something in MAMP/PHP settings, I just don’t remember what. So after a couple of searches, I found a hacky way to solve this issue by adding this opcache_reset() function under /web/app_dev.php.

$kernel = new AppKernel('dev', true);
// $kernel->loadClassCache();
$request = Request::createFromGlobals();
$response = $kernel->handle($request);
$kernel->terminate($request, $response);