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

All Samples(19)  |  Call(19)  |  Derive(0)  |  Import(0)
Retrieve a key from a memcached.

src/r/e/rebang-HEAD/1/BBS/myskoda/myskoda/1/common.py   rebang(Download)
 
            mc = pylibmc.Client()
            value = mc.get(key_with_suffix)
            if value is None:
                value = func(*args, **kw)

src/a/p/appsync-HEAD/appsync/scripts/backoff.py   appsync(Download)
 
    if action == 'get':
        value = client.get(_KEY)
        if value is None:
            print("No Backoff has been set in Memcached")

src/r/e/rebang-HEAD/1/BBS/myskoda/myskoda/1/view.py   rebang(Download)
            #content = safe_encode(content)
            con_md5 = md5(content.encode('utf-8')).hexdigest()
            if mc.get('c_'+con_md5):
                self.write(u'403:请勿灌水 <a href="/t-%s-%s">请返回</a>' % (nodeid, topicid))
                return
                #content = safe_encode(content)
                con_md5 = md5(content.encode('utf-8')).hexdigest()
                if mc.get('c_'+con_md5):
                    self.write(u'403:请勿灌水 <a href="/newpost/%s">请返回</a>' % nodeid)
                    return

src/s/a/saepy-log-HEAD/common.py   saepy-log(Download)
 
            mc = pylibmc.Client()
            value = mc.get(key_with_suffix)
            if value is None:
                value = func(*args, **kw)
 
            mc = pylibmc.Client()
            html = mc.get(key_with_suffix)
            request_time = int(req.request.request_time()*1000)
            if html:

src/w/e/weibotools-HEAD/sync.py   weibotools(Download)
    mc = pylibmc.Client()
 
    if statuses[0].id > mc.get("tid"):
        mc.set("tid", statuses[0].id)
        t = Tenc(TENC_CONF['app_key'], TENC_CONF['app_secret'], TENC_CONF['callback_url'], TENC_CONF['access_token'], TENC_CONF['openid'])
                t.postTweet(statuses[0].text, longitude=statuses[0].geo.coordinates[1], latitude=statuses[0].geo.coordinates[0])
 
    return mc.get("tid")
 
def inst2sina(userid):

src/e/v/EVE-Market-Data-Relay-HEAD/emdr/daemons/relay/dedupers/memcached.py   EVE-Market-Data-Relay(Download)
    # Look at our queue of hashes to figure out if we've seen this
    # message yet.
    was_already_seen = MC_CLIENT.get(cache_key) is not None
    # We always push the message on to the queue, even if it ends up being
    # a dupe, since it "refreshes" the hash.

src/p/e/Personal-Website-HEAD/libs/decorators.py   Personal-Website(Download)
        def decorated_function(*args, **kwargs):
            try:
                rv = mc.get(cache_key)
                if rv is not None:
                    return rv

src/r/e/reddit-HEAD/r2/r2/controllers/health.py   reddit(Download)
                    continue
                mc = pylibmc.Client([server], behaviors=behaviors)
                mc.get("__health_check_%s__" % server)
                results[server] = "OK"
            except pylibmc.Error as e:

src/m/e/memcache-debug-panel-HEAD/test/__init__.py   memcache-debug-panel(Download)
        self.assertLastCall('set', key, 'simple set')
        # get
        self.assertEqual(client.get(key), value, 'simple get')
        self.assertLastCall('get', key, 'simple get')
        # set_multi
        self.assertTrue(client.flush_all(), 'flush_all')
        self.assertLastCall('flush_all', None, 'flush_all')
        self.assertEquals(client.get(incr), None, 'flush worked')
        self.assertLastCall('get', incr, 'flush worked')
 

src/c/a/Cache-Debug-Toolbar-HEAD/test/__init__.py   Cache-Debug-Toolbar(Download)
        self.assertLastCall('set', key, 'simple set')
        # get
        self.assertEqual(client.get(key), value, 'simple get')
        self.assertLastCall('get', key, 'simple get')
        # set_multi
        self.assertTrue(client.flush_all(), 'flush_all')
        self.assertLastCall('flush_all', None, 'flush_all')
        self.assertEquals(client.get(incr), None, 'flush worked')
        self.assertLastCall('get', incr, 'flush worked')
 

  1 | 2  Next