From: Chuck E. <Chu...@ya...> - 2001-05-30 21:05:44
|
At 12:33 PM 5/30/2001 +0200, J=F6rn Schrader wrote: >I have got a question concerning the object cache in MiddleKits ObjectStore >(self._objects). Are there any plans introducing something like a cache >cleaner for frequently clearing the _objects - Dict. in order to avoid= never >ending growing. Good question and "yes", I just haven't figured out what the approach is=20 gonna be and there have been some bigger priorities. For example, up until= =20 a week or two ago, DB API cursors were being improperly used making=20 multi-threading impossible. Just thinking off the top of my head, perhaps the store could convert=20 strong refs in _objects to weak ones after a certain time period. That way= =20 if you were really using the object, it would still be known in the object= =20 cache (which is important for "uniquing") but it could go away otherwise. I= =20 have to brush up on weak ref details again. I wonder if there is an interaction with this approach and g.c. and threads. -Chuck |