Menu

#5 Deep inheritance breaks caching

Volkswagens
open
9
2000-08-28
2000-08-28
No

The inheritance slot-caching mechanism currently only recognizes changes in delegation hierarchy that originate in the child object (ie: the one in which a delegated slot is currently cached). This graph:

p2 <- p1 <- o

with this sequence of events:

def foobar: pass
p2.hello = foobar
o.hello
del p1.isa\_p2

will cause the slot 'hello' to be cached in object o. The last statement will technically break the delegation path that caused that slot to be cached, but the slot will not be uncached. Thus, subsequent invocations of o.hello will succeed, but they shouldn't.

This is also generalizable to anything that happens upstream, such as deleting a slot from a parent when it's been cached in a child. The propagation, in other words, is terribly incomplete.

Discussion


Log in to post a comment.

MongoDB Logo MongoDB