Author: david
Date: Tue Nov 15 13:02:45 2011
New Revision: 10329
Log:
Clear cache for menu partials when culture is changed
Modified:
trunk/lib/myUser.class.php
Modified: trunk/lib/myUser.class.php
==============================================================================
--- trunk/lib/myUser.class.php Mon Nov 14 17:41:29 2011 (r10328)
+++ trunk/lib/myUser.class.php Tue Nov 15 13:02:45 2011 (r10329)
@@ -94,6 +94,17 @@
$this->getAttributeHolder()->remove('nav_context_module');
}
+ public function setCulture($culture)
+ {
+ parent::setCulture($culture);
+
+ // Clear menu cache
+ $cacheDir =
sfConfig::get('sf_cache_dir').DIRECTORY_SEPARATOR.'qubit'.DIRECTORY_SEPARATOR.sfConfig::get('sf_environment').DIRECTORY_SEPARATOR.'template';
+ $cache = new sfFileCache(array('cache_dir' => $cacheDir));
+ $cache->removePattern('*/__browseMenu/sf_cache_key/**');
+ $cache->removePattern('*/__mainMenu/sf_cache_key/**');
+ }
+
public function getUserID()
{
return $this->getAttribute('user_id');
--
You received this message because you are subscribed to the Google Groups
"Qubit Toolkit Commits" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/qubit-commits?hl=en.