I have a function, which given an argument calculates a corresponding value and returns it. Returned value of the function, depends only on its parameters, so I'd like to cache (memoize) the value somehow. Furthermore, I also want to be able to invalidate a cached value.
It seems to be a common need, so I am trying to avoid reinventing the wheel.
What I'm looking for is an advanced highly-configurable high-performance library (tool, framework, etc.) and would like the changes to be as lean as possible. Some good points are:
- efficiently handling concurrent requests
- being able to use different cache backends (e.g. RAM or DB)
- retaining responsiveness on large scale data
What are some good libraries to use, and how are they compared?