From 290b740811c3fdb3eeb5aac35eb1476351d4f135 Mon Sep 17 00:00:00 2001 From: "Jens W. Klein" Date: Tue, 1 Oct 2019 16:34:18 +0200 Subject: [PATCH] on clear, clear also fti cache --- plone/dexterity/schema.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/plone/dexterity/schema.py b/plone/dexterity/schema.py index 7a0cfc0e..60edfa45 100644 --- a/plone/dexterity/schema.py +++ b/plone/dexterity/schema.py @@ -252,6 +252,10 @@ def schema_interfaces(self, fti): def clear(self): for fti in getAllUtilitiesRegisteredFor(IDexterityFTI): self.invalidate(fti) + request = getRequest() + fti_cache = getattr(request, FTI_CACHE_KEY, None) + if fti_cache is not None: + delattr(request, FTI_CACHE_KEY) @synchronized(lock) def invalidate(self, fti):