How to use the ring.redis function in ring

To help you get started, we’ve selected a few ring examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github youknowone / ring / tests / test_redis.py View on Github external
    @ring.redis(redis_client, 'ring-test', expire=expire, coder='json')
    def f(a, b):
        r = a * 100 + b
        return r
github youknowone / ring / tests / test_func_sync.py View on Github external
    @ring.redis(redis_client, 'ring-test', 5)
    def f(a, b):
        r = base[0] + a * 100 + b
        return str(r).encode('utf-8')
github youknowone / ring / tests / test_readme.py View on Github external
        @ring.redis(rc, coder='json')
        def child(self, child_id):
            return {'user_id': self['id'], 'child_id': child_id}
github youknowone / ring / tests / test_func_sync.py View on Github external
def redis_client(request):
    client = request.param
    client.ring = ring.redis
    client.is_binary = True
    client.has_has = True
    client.has_touch = True
    client.has_expire = True
    return client
github youknowone / ring / tests / test_func_sync.py View on Github external
def redis_client(request):
    client = request.param
    client.ring = ring.redis
    client.is_binary = True
    client.has_touch = True
    return client
github youknowone / ring / tests / test_redis.py View on Github external
    @ring.redis(redis_client, 'ring-test', expire=expire)
    def f(a, b):
        r = a * 100 + b
        return str(r).encode('utf-8')
github youknowone / ring / tests / test_readme.py View on Github external
        @ring.redis(rc, coder='json')
        def data(self):
            return self.copy()