Core_extended_cache.Maketype 'a with_init_args = 'a Store.with_init_args Strat.with_init_argsUsed to specify the type of the create and memoize function. This describes the arguments required to initialise the caching strategy and the store. For instance if the store doesn't take any argument (eg.: Store.Table) and the strategy takes an int (eg.: Strategy.Lru) this type will be:
type 'a with_init_args = int -> 'atype ('a, 'b) memo = ( 'a, ( 'b, exn ) Core.Result.t ) tval find : ( 'k, 'v ) t -> 'k -> 'v optionval add : ( 'k, 'v ) t -> key:'k -> data:'v -> unitval remove : ( 'k, _ ) t -> 'k -> unitval clear : ( _, _ ) t -> unitval create : destruct:( 'v -> unit ) option -> ( 'k, 'v ) t with_init_argsval call_with_cache : cache:( 'a, 'b ) memo -> ( 'a -> 'b ) -> 'a -> 'bval memoize :
?destruct:( 'b -> unit ) ->
( 'a -> 'b ) ->
(( 'a, 'b ) memo * ( 'a -> 'b )) with_init_args