Am 12.11.2008 um 02:34 schrieb James Henstridge: <snip />
> > The two collections serve different purposes. The alive list keeps > track of every instance associated with the store but doesn't hold a > strong reference to them so they can be collected as normal. The > cache list holds strong references to the most recently used objects > on the assumption that they might be used again soon. The alive list > will hold everything in the cache list (as those objects are strongly > referenced) plus any other objects that haven't been collected. > > If _load_object() used the cache list instead, then it would be > possible to create two instances representing the same row if the > first instance dropped out of the cache but was still referenced. > This would cause problems. Ah i see. Big thanks for the thorough explanation - read the code again and it sure makes sense now ;) you learn something new every day i guess... <snip /> > That's cool. With one day delay: As was to be expected bugfix from trunk solved the problem. Here too: Big thanks for that > I don't think it fits into the architecture of any of the apps we've > been building, but it does sound like this might be useful to others. > Do you think it is the kind of thing that would make sense to > distribute as part of Storm? Releaseing it as part of storm would be counter-productive i guess. The zope implementation is very small and direct and i think it wouldn't be good to overbloat it with things that only a small percentage of storm users would need. I was thinking about releasing that and a few other things pypi as z3c.storm collection or so.Might be a good idea to collect a few pieces there and make a seperate storm branch in z3c namespace (whereas i will sure have to talk to a few guys at zope corp about that first :) ) - Andy -- storm mailing list [email protected] Modify settings or unsubscribe at: https://lists.ubuntu.com/mailman/listinfo/storm
