Skip to content

Instantly share code, notes, and snippets.

@asjustas
Created September 24, 2014 10:56
Show Gist options
  • Save asjustas/fb06dbd66b4db4966e0b to your computer and use it in GitHub Desktop.
Save asjustas/fb06dbd66b4db4966e0b to your computer and use it in GitHub Desktop.
<?php
Route::filter('after', function($response)
{
opcache_reset();
});
App::before(function($request)
{
$cachedViewsDirectory=app('path.storage').'/views/';
$files = glob($cachedViewsDirectory.'*');
foreach($files as $file) {
$parts = explode('/', $file);
$fname = end($parts);
if(($fname != '.gitignore') && is_file($file)) {
@unlink($file);
}
}
});
?>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment