Stavros Korokithakis Stavros Korokithakis - 1 year ago 62
Python Question

Is there a Python caching library?

I'm looking for a Python caching library but can't find anything so far. I need a simple

-like interface where I can set keys and their expiration and get them back cached. Sort of something like:

cache.get(myfunction, duration=300)

which will give me the item from the cache if it exists or call the function and store it if it doesn't or has expired. Does anyone know something like this?