onInit method

void onInit(
  1. Memo<T, A> memo,
  2. A arg
)

It's called when the memoized function is invoked for the first time with a new set of arguments. It allows you to perform any initialization logic or side effects before the calculation is performed.

Implementation

void onInit(Memo<T, A> memo, A arg) {}