(key)
| 46 | return set(json.loads(raw_data)) |
| 47 | |
| 48 | def 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']) |
no test coverage detected