Nuke provides a nice button to annihilate your cache from the comfort of your browser, it's violent like that.
Import the template fragment where you need it ...
{% include "ObCacheNukeBundle::button.html.twig" %}
... click on the darn thing and take a sip of coffee while war is waging on your cache files!
// app/AppKernel.php
public function registerBundles()
{
return array(
// ...
new FOS\JsRoutingBundle\FOSJsRoutingBundle(),
new Ob\CacheNukeBundle\ObCacheNukeBundle(),
);
}
ob_cache_nuke:
resource: "@ObCacheNukeBundle/Resources/config/routing.yml"
prefix: /
fos_js_routing:
resource: "@FOSJsRoutingBundle/Resources/config/routing/routing.xml"
You should probably – like seriously, do it – add a route prefix that's behind the firewall, that way no weirdo with too much time will write a script to continuously clear your cache.
$ php app/console assets:install --symlink web
- FOSJsRoutingBundle by Friends of Symfony
- Ladda buttons by Hakim El Hattab
This bundle is released under the MIT License. See the bundled LICENSE file for details.