Cache_lib.Cachedval pure : 't -> ( 't, _ ) tpure v returns a pure cached object with * the value of v. Pure cached objects are used * for unifying values with the Cached.t type for * convenience. Pure cached objects are not stored * in a cache and cannot be consumed.
val is_pure : ( _, _ ) t -> boolval original : ( _, 'b ) t -> 'bval peek : ( 't, _ ) t -> 'tpeek c inspects the value of c without consuming * c.
val final_state : ( 't1, 't2 ) t -> 't2 Intf.final_stateval invalidate_with_failure : ( 't, _ ) t -> 'tinvalidate c removes the underlying cached value * of c from its cache. invalidate will return an * Error if the underlying cached value was not * present in the cache.
val invalidate_with_success : ( 't, _ ) t -> 'tval was_consumed : ( _, _ ) t -> booltransform c ~f ~logger maps the value of c over * f, consuming c.
val sequence_deferred :
( 't Async_kernel.Deferred.t, 'cache_t ) t ->
( 't, 'cache_t ) t Async_kernel.Deferred.tsequence_deferred c lifts a deferred value from * c, returning a non deferred cached object in a * deferred context. c is consumed.
val sequence_result :
( ( 't, 'e ) Core_kernel.Result.t, 'cache_t ) t ->
( ( 't, 'cache_t ) t, 'e ) Core_kernel.Result.tsequence_result lifts a result value from * c, returning a result containing the raw * cached value if the value of c was Ok. * Otherwise, an Error is returned and c * is invalidated from the cache