asyncio的memcached?客戶端:aiomcache
aiomcache 是極簡的 asyncio memcached 客戶端。
API
import asyncio import aiomcache loop = asyncio.get_event_loop() @asyncio.coroutine def hello_aiomcache(): mc = aiomcache.Client("127.0.0.1", 11211, loop=loop) yield from mc.set(b"some_key", b"Some value") value = yield from mc.get(b"some_key") print(value) values = yield from mc.multi_get(b"some_key", b"other_key") print(values) yield from mc.delete(b"another_key") loop.run_until_complete(hello_aiomcache())
本文由用戶 wge7 自行上傳分享,僅供網友學習交流。所有權歸原作者,若您的權利被侵害,請聯系管理員。
轉載本站原創文章,請注明出處,并保留原始鏈接、圖片水印。
本站是一個以用戶分享為主的開源技術平臺,歡迎各類分享!