Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
@ring.memcache(pythonmemcache_client, expire=1)
def simple(key):
return key
@ring.memcache(client, coder='json')
def f(a):
return a
@ring.memcache(mc, coder='pickle')
def now():
return datetime.datetime.now()
@ring.memcache(memcache_client, 'ring-test')
def f(a, b):
r = base[0] + a * 100 + b
sr = str(r)
if memcache_client.is_binary:
sr = sr.encode('utf-8')
return sr
@ring.memcache(memcache_client, 'ring-test', coder='json')
def f(a, b):
return a * 100 + b
@ring.memcache(mc, expire=60)
def get_url(url):
return requests.get(url).content