def get_redis() -> Generator: """ Get redis database """ try: rdc = RedisCache() yield rdc finally: pass
def rdc() -> Generator: """ Get redis database """ yield RedisCache()