MCPcopy Create free account
hub / github.com/SeldonIO/seldon-server / memcache_get

Function memcache_get

python/seldon/microservice/recommend.py:48–57  ·  view source on GitHub ↗
(key)

Source from the content-addressed store, hash-verified

46 return set(json.loads(raw_data))
47
48def memcache_get(key):
49 key=str(key)
50 value=None
51 _mc_pool = current_app.config.get("seldon_memcache")
52 if not _mc_pool is None:
53 with _mc_pool.reserve(block=True) as mc:
54 value = mc.get(key)
55 return value
56 else:
57 return None
58
59
60@recommend_blueprint.route('/recommend',methods=['GET','POST'])

Callers 1

do_recommendFunction · 0.85

Calls 2

getMethod · 0.65
strFunction · 0.50

Tested by

no test coverage detected