Caching the result of common inputs and discarding not-recently-used results can be useful on functions with huge - but nonuniformly distributed - input and output spaces. At the extreme, you might have procedural image or texture generation - perhaps the postprocessing of another image or texture, for example. Impurity is a great way to end up with serious cache invalidation bugs when untracked inputs are changed, and purity a great way to avoid them.
Caching the result of common inputs and discarding not-recently-used results can be useful on functions with huge - but nonuniformly distributed - input and output spaces. At the extreme, you might have procedural image or texture generation - perhaps the postprocessing of another image or texture, for example. Impurity is a great way to end up with serious cache invalidation bugs when untracked inputs are changed, and purity a great way to avoid them.