I developed a Python client library, which is a client wrapper for a web API: a nice-to-have feature would be a local cache mechanism: this would save time and bandwidth when the library clients invoke the very same request on the web API at different times.
I have very few requirements
What is the most simple algorithm that can be used?
I was thinking about a LRU (Least Recently Used) algorithm but I guess that other alternatives can be assessed - I'm not expert about caches at all!
You could just copy and adapt the source from lru_cache (see http://hg.python.org/cpython/file/default/Lib/functools.py).