medikoo / memoizee

Complete memoize/cache solution for JavaScript
ISC License
1.73k stars 61 forks source link

setter method #119

Open yarosdev opened 3 years ago

yarosdev commented 3 years ago

It would be great to be possible preset cached value.

const anyValue = "anyvalue";

memoized.set(...args, anyValue);

const result = memoized(...args); // Hit cache

medikoo commented 3 years ago

@yarosdev great thanks for proposal.

It's scheduled to be possible with v1, which will present an improved interface: https://github.com/medikoo/memoizee/issues/73