cadrumo.application.modelo._transaction_catalogue_cache module

Per-calculation TransactionCatalogue read-through caching.

class MemoizedTransactionCatalogueRepository(repository)[source]

Bases: object

Cache immutable catalogue reads across one source-mesh calculation.

Multiple enrolled ledger resolvers share the same repository during one calculation. The wrapper loads each full catalogue or exact date window at most once while delegating writes directly to the authority repository.

Parameters:

repository (TransactionCatalogueRepositoryProtocol)

property bucket_id: str

Return the wrapped repository’s bound bucket id.

exists()[source]

Delegate the repository’s cheap index-only existence read.

Return type:

bool

load()[source]

Load the full catalogue from storage at most once.

Return type:

TransactionCatalogue

load_for_date_range(start, end)[source]

Load an exact date-window catalogue at most once.

Return type:

TransactionCatalogue

Parameters:
load_by_ids(transaction_ids)[source]

Load one canonical contributor-id set at most once.

Return type:

TransactionCatalogue

Parameters:

transaction_ids (Iterable[str])

partition_by_date_range(start, end)[source]

Load an exact date-window partition at most once.

Return type:

LedgerDatePartition

Parameters:
save(catalogue)[source]

Delegate a TransactionCatalogue write to the authority repository.

Return type:

None

Parameters:

catalogue (TransactionCatalogue)