DEV Community

Discussion on: Optimize the hell out of your Javascript programs with Memoization.

Collapse
 
elmuerte profile image
Michiel Hendriks

Caching and memoization are related, but not the same. Caching is mutable, and generally constraint in size or time.

Catch invalidation is a thing, memoization invalidation is not.

In most cases you want caching. Only in certain algebraic cases you want memoization.