Did I find the right examples for you? yes no

All Samples(77)  |  Call(77)  |  Derive(0)  |  Import(0)
Retrieves a key from the memcache.

@return: The value or None.

src/s/a/samples-HEAD/memcache-bench/memcachebench.py   samples(Download)
    start = time.time()
    for i in range(num):
        result = client.get("%d" % i)
    end = time.time()
    diff = end - start

src/z/e/zenmachine-HEAD/decorator_example_memcache.py   zenmachine(Download)
        def wrapper(*args, **kwargs): # an inside wrapper function to work parameters
            mc = memcache.Client(["127.0.0.1:11211"])
            param = args[0]
            print "---------------- %s ------------ " % param
            rp = mc.get(param) # check if there any value under this key

src/w/e/WebBot-HEAD/webbot/examples/read_cache.py   WebBot(Download)
 
while True:
    print(mc.get('key'))
    sleep(1)
 

src/s/h/sharek-HEAD/core/views.py   sharek(Download)
      user = request.user
 
    topics_tree = mc.get('topics_tree')
    if not topics_tree:
         topics_tree = Topic.objects.topics_tree()
         mc.set('topics_tree', topics_tree, settings.MEMCACHED_TIMEOUT)
 
    tags = mc.get('tags')
         mc.set('tags', tags, settings.MEMCACHED_TIMEOUT)
 
    contributions = mc.get('contributions')
    if not contributions:
         contributions = Topic.total_contributions()
         mc.set('contributions', contributions, 3600) # 15 Minutes
 
    top_users = mc.get('top_users')
         mc.set('top_users', top_users, settings.MEMCACHED_TIMEOUT)
 
    top_liked = mc.get('top_liked')
    if not top_liked:
         top_liked = ArticleDetails.objects.get_top_liked(5)

src/t/i/TileStache-HEAD/TileStache/Memcache.py   TileStache(Download)
        key = tile_key(layer, coord, format, self.revision, self.key_prefix)
 
        value = mem.get(key)
        mem.disconnect_all()
 

src/r/e/RedKindle-HEAD/model.py   RedKindle(Download)
def getuser(name):
	try:
		result = memc.get(hash('kinuser%s' % name))
		if not result:
			myvar = dict(name=name)
def get_allbooks():
	try:
		value = memc.get(hash('feeds'))
		if not value:
			value = list(db.select('feeds'))
def get_category():
	try:
		result = memc.get(hash('cate'))
		if not result:
			result = list(db.select('category'))
def get_user_num():
	try:
		result = memc.get(hash('count'))
		if not result:
			result = db.query('select count(*) as count from kinuser')[0]
def get_article2id(feed_id):
	try:
		result = memc.get(hash('rss_gain%s' % feed_id))
		if not result:
			myvar = dict(f_id=feed_id)

src/s/h/sharek-HEAD/core/reports/views.py   sharek(Download)
        return HttpResponseRedirect(reverse('index'))
 
    chart_data = mc.get('chart_data')
    if not chart_data:
         chart_data = Feedback.objects.feedback_charts()
 
    if topic_slug:
        topic = mc.get('topic_' + str(topic_slug))
        if not topic:
             topic = get_object_or_404( Topic, slug=topic_slug )
             mc.set('topic_' + str(topic_slug), topic, settings.MEMCACHED_TIMEOUT)
 
        articles = mc.get(str(topic_slug) + '_articles')

src/g/r/graphite-HEAD/contrib/memcache_whisper.py   graphite(Download)
    def __init__(self,*args,**kwargs):
      self.name = args[0]
      self.mode = args[1]
      if self.mode == "r+b" or self.mode == "rb":
        StringIO.__init__(self, MC.get(self.name))
  def exists(path):
    return MC.get(path) != None
 
  def drop(path):
    MC.delete(path)

src/z/a/zarkpy-HEAD/web/cgi/processor/cache.py   zarkpy(Download)
def getData(key):
    data = mem_client.get(key)
    return data if data and data.has_key('html') else None
 
def getLastCachedTime(key):
    data = mem_client.get(key)

src/m/i/miyamoto-HEAD/attic/zmq_prototype/core.py   miyamoto(Download)
    while True:
        id, task = incoming.recv_pyobj()
        if not datastore.get('%s-dispatch' % id):
            outgoing.send("%s:%s" % (id, task))
            datastore.set('%s-dispatch' % id, dispatch_timeout)

  1 | 2 | 3 | 4 | 5  Next