def set_changed(meth):
 @wraps(meth)
 def changed_wrapper(self, *args, **kwargs):
  self._cache.clear()
  return meth(self, *args, **kwargs)
 return changed_wrapper

def set_changed ( meth ) : @ wraps ( meth ) def changed_wrapper ( self , * args , ** kwargs ) : self . _cache . clear ( ) return meth ( self , * args , ** kwargs ) return changed_wrapper
function to decorate methods in order to empty the memoized cache .