diff --git a/src/ZODB/interfaces.py b/src/ZODB/interfaces.py index 714963143..c2568c3c6 100644 --- a/src/ZODB/interfaces.py +++ b/src/ZODB/interfaces.py @@ -1,3 +1,4 @@ +# -*- coding: utf-8 -*- ############################################################################## # # Copyright (c) Zope Corporation and Contributors. @@ -280,9 +281,9 @@ class IStorageWrapper(Interface): - Out-of-band invalidation support A storage can notify it's wrapper of object invalidations that - don't occur due to direct operations on the storage. Currently - this is only used by ZEO client storages to pass invalidation - messages sent from a server. + don't occur due to direct operations on the storage. This is + used by non-IMVCCStorage storages like ZEO and NEO to pass + invalidation messages sent from storage server. - Record-reference extraction @@ -318,6 +319,14 @@ def invalidate(transaction_id, oids): The oids argument is an iterable of object identifiers. + Unless cache needs to be completely cleared via invalidateCache + event, wrapped storage calls invalidate for all transactions in + the order as they are committed. For every transaction full set + of its objects - both modified and just created - is reported. + + invalidate(tid) is always called before storage starts to report + its lastTransaction() ≥ tid. + The version argument is provided for backward compatibility. If passed, it must be an empty string. @@ -1209,8 +1218,8 @@ def release(): def poll_invalidations(): """Poll the storage for external changes. - Returns either a sequence of OIDs that have changed, or None. When a - sequence is returned, the corresponding objects should be removed + Returns either None, or a sequence of OIDs that have created and changed. + When a sequence is returned, the corresponding objects should be removed from the ZODB in-memory cache. When None is returned, the storage is indicating that so much time has elapsed since the last poll that it is no longer possible to enumerate all of the changed OIDs, since the