Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
@ring.redis(redis_client, 'ring-test', expire=expire, coder='json')
def f(a, b):
r = a * 100 + b
return r
@ring.redis(redis_client, 'ring-test', 5)
def f(a, b):
r = base[0] + a * 100 + b
return str(r).encode('utf-8')
@ring.redis(rc, coder='json')
def child(self, child_id):
return {'user_id': self['id'], 'child_id': child_id}
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
def redis_client(request):
client = request.param
client.ring = ring.redis
client.is_binary = True
client.has_touch = True
return client
@ring.redis(redis_client, 'ring-test', expire=expire)
def f(a, b):
r = a * 100 + b
return str(r).encode('utf-8')
@ring.redis(rc, coder='json')
def data(self):
return self.copy()