Commit a10f262c authored by Nicolas Dumazet's avatar Nicolas Dumazet

sync after portal type classes invalidation on another node


git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@38657 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent d509398e
......@@ -34,7 +34,16 @@ def getSite():
return site
hooks.getSite = getSite
last_cookie_value = None
def setSite(site=None):
_setSite(site)
# TODO: check if caches related to portal types as classes must be invalidated
cookie = getattr(site, '_dynamic_class_cookie', None)
if cookie is not None:
global last_cookie_value
if cookie.value != last_cookie_value:
# some other node changed a portal type
# reload locally the dynamic classes
from Products.ERP5Type.Dynamic.portaltypeclass import resetDynamicDocuments
resetDynamicDocuments(site, slave=True)
last_cookie_value = cookie.value
hooks.setSite = setSite
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