mobacache is a pythonic interface for creating a cache over redis. It provides simple decorators that can be added to any function to cache its return values.
Python 2.7+
pip install moba-cache
or to get the latest version
git clone https://github.com/redrush85/mobacache.git
cd mobacache
python setup.py install
from mobacache import CacheBuilder
import redis
redis_conn = redis.StrictRedis()
cb = CacheBuilder(redis_conn)
@cb.cache(ttl=10)
def my_method(a=1, b=2, c=0):
return a + b + c
- Alexander Kuts
- Roman Gorin
python -m unittest