The functools.lru_cache (or functools.memoize) function in the standard library is fantastic for what it does. I wrote this library to provide the same interface while allowing the caching mechanism to be any database supported by SQLAlchemy or Redis.