Memo

The Memo effect allows the caching of expensive computations. Computations are “stored” with a given key, so that the next computation with the same key will return the previously computed value. When interpreting those computations a Cache must be provided: `> there is only one invocation <=> true`

There are 2 cache implementations provided in this library to support the Memo effect:

You can also use other, and better, cache implementations like Caffeine to get more functionalities like eviction policies, maximum size and so on. You will need to implement the Cache interface for this

trait Cache {
  def memo[V](key: AnyRef, value: =>V): V
}