Did I find the right examples for you? yes no      Crawl my project      Python Jobs

All Samples(8)  |  Call(8)  |  Derive(0)  |  Import(0)
Get a key from server.

:param key: Key's name
:type key: basestring
:param get_cas: If true, return (value, cas), where cas is the new CAS value.
:type get_cas: boolean
:return: Returns a key data from server.
:rtype: object

src/h/n/HNify-HEAD/app.py   HNify(Download)
    limit = int(limit) if limit is not None else 30
    temp_cache = mc.get(story_type) # get the cache from memory
    if temp_cache is not None and len(temp_cache['stories']) >= limit:
        mc.set(story_type, {'stories': serialize(stories)}, time=timeout)
        return jsonify(mc.get(story_type))
def comments(story_id):
    story_id = int(story_id)
    memcache_key = "%s_comments" % (story_id)
    temp_cache = mc.get(memcache_key) # get the cache from memory
        mc.set(memcache_key, {'comments': result}, time=timeout)
    return jsonify(mc.get(memcache_key))
def trends():
    Returns currently trending topics.
    temp_cache = mc.get('trends') # get the cache from memory

src/p/y/python-async-memcached-server-HEAD/benchmark.py   python-async-memcached-server(Download)
for i in xrange(1, 100000):
    client.set('foo', i, 1000)
    total += client.get('foo')
end = datetime.datetime.now()

src/p/y/python-binary-memcached-HEAD/threading-processing-safe.py   python-binary-memcached(Download)
def get(key):
    return c.get(key)
with concurrent.futures.ProcessPoolExecutor(max_workers=10) as executor:
    f = [executor.submit(get, '12345690') for i in xrange(20)]