[Erp5-report] r17614 - /erp5/trunk/products/ERP5Form/Document/Preference.py
nobody at svn.erp5.org
nobody at svn.erp5.org
Thu Nov 15 11:52:28 CET 2007
Author: jp
Date: Thu Nov 15 11:52:28 2007
New Revision: 17614
URL: http://svn.erp5.org?rev=17614&view=rev
Log:
Added comment to explain why / how cache should be ideally cleared.
Modified:
erp5/trunk/products/ERP5Form/Document/Preference.py
Modified: erp5/trunk/products/ERP5Form/Document/Preference.py
URL: http://svn.erp5.org/erp5/trunk/products/ERP5Form/Document/Preference.py?rev=17614&r1=17613&r2=17614&view=diff
==============================================================================
--- erp5/trunk/products/ERP5Form/Document/Preference.py (original)
+++ erp5/trunk/products/ERP5Form/Document/Preference.py Thu Nov 15 11:52:28 2007
@@ -66,7 +66,15 @@
def _clearCache(self):
"""Clear caches used by methods of this preference
+
# TODO: clear different caches according to the preference priority
+ # TODO: (XXX) currently, if one use enables / disables a cache, caches
+ for all other users are reset. This is not good for a system
+ in which users do a lot of preference validation. A better solution
+ is needed for this. But it is not easy because the concept of
+ "per user cache" has been proven to be ambiguous or useless.
+ In theory, a solution could consist in using more keys to
+ select caches or to delete "manually" certain cache keys.
"""
portal_caches = getToolByName(self.getPortalObject(), 'portal_caches')
portal_caches.clearCache(cache_factory_list=('erp5_ui_short',))
@@ -83,4 +91,3 @@
def disable(self):
"""Workflow method"""
self._clearCache()
-
More information about the Erp5-report
mailing list