Skip to main content

Module cache

Module cache 

Source
Expand description

Facility for cached asynchronous operations, with operations keyed by a key type and ensuring mutual exclusion of operations with the same key.

Structsยง

Cache
Cache for asynchronous operations. Each operation is associated with a key, and operations are cached, deduplicated and mutually exclusive with other operations on the same key, including in-progress operations.
CacheFut
A future returned on cache hits. CacheFut::wait returns a future which resolves when the cache value has been computed by another task.
CacheSetter
A value returned on cache misses. The owner of this struct should compute the value, then call CacheSetter::set to write the value into the cache.