[Zope-dev] Automatically reindexing CatalogAware objects

Kevin Dangoor kid@kendermedia.com
Tue, 15 Feb 2000 10:42:48 -0500


----- Original Message -----
From: "Itamar Shtull-Trauring" <itamars@ibm.net>
To: <zope-dev@zope.org>
Sent: Tuesday, February 15, 2000 9:28 AM
Subject: [Zope-dev] Automatically reindexing CatalogAware objects


> Every time a CA object gets changed a transaction is commited, which means
> the object gets pickled and saved into the ZODB.
>
> Every time an object is pickled its __getstate__ method is called.
>
> So, we define the following __getstate__ for the CatalogAware class:

This sounds like a good thing to me, unless __getstate__ is called at times
other than just when the transaction is committed. reindex_object takes a
little bit of time to run and can cause the Data.fs file to balloon in size,
so you don't really want to do it more than necessary.

Kevin