--- a/cwvreg.py Mon Aug 31 14:26:44 2009 +0200
+++ b/cwvreg.py Mon Aug 31 14:27:16 2009 +0200
@@ -16,12 +16,18 @@
from cubicweb import (ETYPE_NAME_MAP, Binary, UnknownProperty, UnknownEid,
ObjectNotFound, NoSelectableObject, RegistryNotFound,
- RegistryOutOfDate, CW_EVENT_MANAGER)
+ RegistryOutOfDate, CW_EVENT_MANAGER, onevent)
from cubicweb.utils import dump_class
from cubicweb.vregistry import VRegistry, Registry
from cubicweb.rtags import RTAGS
+@onevent('before-registry-reload')
+def clear_rtag_objects():
+ for rtag in RTAGS:
+ rtag.clear()
+
+
def use_interfaces(obj):
"""return interfaces used by the given object by searchinf for implements
selectors, with a bw compat fallback to accepts_interfaces attribute