assignment v0.2.0 Assignment.Cache
Link to this section Summary
Functions
Extracts a key from input
and returns whether or not cache
has a value under that key
Returns a new cache with the given key_fun
Extracts a key from input
and adds value
to cache
under that key
Extracts a key from input
and returns the value associated with that key in cache
Link to this section Types
Link to this type
t()
t() :: %Assignment.Cache{ data: %{optional(any()) => Assignment.Result.destination()}, key_fun: (any() -> any()) }
Link to this section Functions
Link to this function
cached?(cache, input)
Extracts a key from input
and returns whether or not cache
has a value under that key
Link to this function
new(key_fun)
Returns a new cache with the given key_fun
Link to this function
put(cache, input, value)
Extracts a key from input
and adds value
to cache
under that key
Link to this function
value(cache, input)
Extracts a key from input
and returns the value associated with that key in cache