Metadata-Version: 2.1
Name: py-redis-cachetools
Version: 0.1.2
Summary: cachetools core + redis
Home-page: https://500apps.com
Keywords: py-redis-cachetools
Author: 500apps
Author-email: satyabrata.swain@500apps.com
Requires-Python: >=3.8,<4.0
Classifier: Operating System :: OS Independent
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.8
Classifier: Programming Language :: Python :: 3.9
Classifier: Programming Language :: Python :: 3.10
Classifier: Topic :: Software Development :: Documentation
Classifier: Topic :: Software Development :: Libraries :: Python Modules
Classifier: Topic :: Software Development :: Quality Assurance
Requires-Dist: redis (>=3.5.3,<4.0.0)
Project-URL: Repository, https://500apps.com
Description-Content-Type: text/markdown

# py-redis-cachetools
cachetools core + redis

Requirements:
-------------
redis 3.5.3


Installation:
-------------

    pip install py-redis-cachetools

env variables:
-------------
    REDIS_HOST
    REDIS_DB


Usage:
------

    import time
    import cachetools, cachetools.rcache


    # cache = cachetools.rcache.RedisCache(ttl=60)

    cache = cachetools.rcache.PrefixedRedisCache("hb-cachetools-cache", ttl=60)


    @cachetools.cached(cache=cache)
    def test(a, b):
        return {
            'hi': 'hello'
        }



    a = 1
    while True:
        print(test(a, 2))
        print(a)
        time.sleep(1)
        a = a+1
