[ZODB-Dev] ZEO Client cache invalidation?
Jeremy Hylton
jeremy@alum.mit.edu
Thu, 5 Jul 2001 14:54:02 -0400
[I wrote:]
> As I understand sync() -- and I may be wrong -- it's necessary when you
> start a transaction after an idle period. If you finish one transaction
and
> immediately start another, there should be no pending invalidations. If
> there's a long delay between the end of one transaction and the start of
the
> next, the invalidation messages will get queued up waiting for the next
> commit/abort.
[Christian wrote:]
Or if you don't have a transaction currently open, which is my case - my
client does read-only queries, and it wasn't picking up the change. Is
calling begin() really necessary, or do we auto-begin() one on any
persisted object modification?
[I reply:]
You've got it. If you haven't modified any objects, I don't think the
machinery realizes that a transaction has started. As soon as you modify an
object, the current transaction starts getting tracked. If you're doing a
read-only transaction, you need a sync().
Jeremy