Skip to content

Instantly share code, notes, and snippets.

@sevein
Created November 18, 2011 19:22
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save sevein/1377480 to your computer and use it in GitHub Desktop.
Save sevein/1377480 to your computer and use it in GitHub Desktop.
Remove cache
Index: apps/qubit/modules/menu/actions/listAction.class.php
===================================================================
--- apps/qubit/modules/menu/actions/listAction.class.php (revision 10336)
+++ apps/qubit/modules/menu/actions/listAction.class.php (working copy)
@@ -44,8 +44,8 @@
// Remove cache
if ($this->context->getViewCacheManager() !== null)
{
- $this->context->getViewCacheManager()->remove('@sf_cache_partial?module=menu&action=_browseMenu&sf_cache_key=settings');
- $this->context->getViewCacheManager()->remove('@sf_cache_partial?module=menu&action=_mainMenu&sf_cache_key=settings');
+ $this->context->getViewCacheManager()->remove('@sf_cache_partial?module=menu&action=_browseMenu&sf_cache_key=*');
+ $this->context->getViewCacheManager()->remove('@sf_cache_partial?module=menu&action=_mainMenu&sf_cache_key=*');
}
}
Index: apps/qubit/modules/menu/actions/deleteAction.class.php
===================================================================
--- apps/qubit/modules/menu/actions/deleteAction.class.php (revision 10336)
+++ apps/qubit/modules/menu/actions/deleteAction.class.php (working copy)
@@ -40,8 +40,8 @@
// Remove cache
if ($this->context->getViewCacheManager() !== null)
{
- $this->context->getViewCacheManager()->remove('@sf_cache_partial?module=menu&action=_browseMenu&sf_cache_key=settings');
- $this->context->getViewCacheManager()->remove('@sf_cache_partial?module=menu&action=_mainMenu&sf_cache_key=settings');
+ $this->context->getViewCacheManager()->remove('@sf_cache_partial?module=menu&action=_browseMenu&sf_cache_key=*');
+ $this->context->getViewCacheManager()->remove('@sf_cache_partial?module=menu&action=_mainMenu&sf_cache_key=*');
}
$this->redirect(array('module' => 'menu', 'action' => 'list'));
Index: apps/qubit/modules/menu/actions/editAction.class.php
===================================================================
--- apps/qubit/modules/menu/actions/editAction.class.php (revision 10336)
+++ apps/qubit/modules/menu/actions/editAction.class.php (working copy)
@@ -152,8 +152,8 @@
// Remove cache
if ($this->context->getViewCacheManager() !== null)
{
- $this->context->getViewCacheManager()->remove('@sf_cache_partial?module=menu&action=_browseMenu&sf_cache_key='.$this->context->getUser()->getCulture());
- $this->context->getViewCacheManager()->remove('@sf_cache_partial?module=menu&action=_mainMenu&sf_cache_key='.$this->context->getUser()->getCulture());
+ $this->context->getViewCacheManager()->remove('@sf_cache_partial?module=menu&action=_browseMenu&sf_cache_key=*');
+ $this->context->getViewCacheManager()->remove('@sf_cache_partial?module=menu&action=_mainMenu&sf_cache_key=*');
}
$this->redirect(array('module' => 'menu', 'action' => 'list'));
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment