A piece of cache that keeps track of the dirty status.
void clean(const Dirt &d)
Call this when the cache is refreshed.
bool dirty(const Dirt &d)
Returns true if the cache needs to be refreshed.
A piece of dirt for dirtying the caches.
void touch()
Make the cache dirty.
Multi-piece cache-dirtying object.
Dirts(size_t n=0)
Number of objects that should be cached.
A piece of multi-object cache.
std::tuple< size_t, size_t > dirty_range(const Dirts &d)
Find the range to refresh.
void refresh(size_t n_dirts)
void clean_range(const Dirts &d, size_t n)
Clean a range of the cache.
void refresh(const Dirts &d)
Force-refresh the whole range.