Commit dcb1ac17 authored by Yoshinori Okuji's avatar Yoshinori Okuji

invalidate the cache in _aq_reset for safety.


git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@4510 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent 004992ed
...@@ -48,7 +48,7 @@ from Products.ERP5Type.Utils2 import _getListFor ...@@ -48,7 +48,7 @@ from Products.ERP5Type.Utils2 import _getListFor
from Products.ERP5Type.Accessor.TypeDefinition import list_types from Products.ERP5Type.Accessor.TypeDefinition import list_types
from Products.ERP5Type.Accessor import Base as BaseAccessor from Products.ERP5Type.Accessor import Base as BaseAccessor
from Products.ERP5Type.XMLExportImport import Base_asXML from Products.ERP5Type.XMLExportImport import Base_asXML
from Products.ERP5Type.Cache import CachingMethod from Products.ERP5Type.Cache import CachingMethod, clearCache
from Products.CMFCore.WorkflowCore import ObjectDeleted from Products.CMFCore.WorkflowCore import ObjectDeleted
from Accessor import WorkflowState from Accessor import WorkflowState
...@@ -114,6 +114,9 @@ def _aq_reset(): ...@@ -114,6 +114,9 @@ def _aq_reset():
Base.aq_method_generated = {} Base.aq_method_generated = {}
Base.aq_portal_type = {} Base.aq_portal_type = {}
Base.aq_related_generated = 0 Base.aq_related_generated = 0
# Some method generations are based on portal methods, and portal methods cache results.
# So it is safer to invalidate the cache.
clearCache()
class PropertyHolder: class PropertyHolder:
isRADContent = 1 isRADContent = 1
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment