Metadata-Version: 2.1
Name: Python-Redis-Caching
Version: 0.0.6
Summary: Caching your data to Redis
Home-page: https://github.com/nbmhoang/python-redis-caching
Author: Hoang Nguyen
Author-email: minhhoangnguyenbao99@gmail.com
License: UNKNOWN
Platform: UNKNOWN
Classifier: License :: OSI Approved :: MIT License
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.7
Classifier: Programming Language :: Python :: 3.8
Classifier: Programming Language :: Python :: 3.9
Requires-Python: >=3.6
Description-Content-Type: text/markdown
Requires-Dist: redis

# Use Redis as a backend for caching

```python
from redis_cache.cache_manager import CacheManager
from datetime import timedelta
from time import sleep

cache = CacheManager('localhost', port=6379, db=1, expiration=timedelta(days=1))

def sum(a, b):
    sleep(2)
    return a + b

cache('S', sum, 8, 5) # Took 2.1s
cache('S', sum, 8, 5) # Took 1.8ms
```

