We have mk_write_cached_store, but though quite general, it isn't completely, or at least doesn't cover some common cases without hacking.
Example: Flushing before new item is added to cache. This is need, for e.g. when we want to group data for a same key.
One general view is to provide a function that brings us from the (new_item, old_cache, old_persister)' state to a(new_cache, new_persister)` state. Obviously, though, we need to provide idioms for the common cases.
We have
mk_write_cached_store
, but though quite general, it isn't completely, or at least doesn't cover some common cases without hacking.Example: Flushing before new item is added to cache. This is need, for e.g. when we want to group data for a same key.
One general view is to provide a function that brings us from the
(new_item, old_cache, old_persister)' state to a
(new_cache, new_persister)` state. Obviously, though, we need to provide idioms for the common cases.