NullCache.transact()
A no-op context manager that yields this NullCache.
Usage
NullCache.transact(
retry=False,
*,
key=None,
)It never opens a transaction on an invalidate= cache: removals forwarded inside the block land at once, and an exception in the block doesn’t undo them.
Parameters
retry: bool = False-
Accepted for Cache.transact()’s signature; it must be a
bool. key: str | None = None-
Accepted so a switched-off sharded cache’s
transact(key=...)works too; it must be astror None.
Raises
TypeError-
retryisn’t abool, orkeyisn’t astror None.