Skip to content

Commit

Permalink
on clear, clear also fti cache
Browse files Browse the repository at this point in the history
  • Loading branch information
jensens committed Oct 1, 2019
1 parent 87f1db8 commit 290b740
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions plone/dexterity/schema.py
Original file line number Diff line number Diff line change
Expand Up @@ -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):
Expand Down

0 comments on commit 290b740

Please sign in to comment.