def _invalidates_cache(f):
 def inner_func(self, *args, **kwargs):
  rv = f(self, *args, **kwargs)
  self._invalidate_cache()
  return rv
 return inner_func

def _invalidates_cache ( f ) : def inner_func ( self , * args , ** kwargs ) : rv = f ( self , * args , ** kwargs ) self . _invalidate_cache ( ) return rv return inner_func
decorator for rruleset methods which may invalidate the cached length .