Did I find the right examples for you? yes no

All Samples(537)  |  Call(501)  |  Derive(17)  |  Import(19)
Object representing a pool of memcache servers.

See L{memcache} for an overview.

In all cases where a key is used, the key can be either:
    1. A simple hashable type (string, integer, etc.).
    2. A tuple of C{(hashvalue, key)}.  This is useful if you want to avoid
    making this module calculate a hash value.  You may prefer, for
    example, to keep all of a given user's objects on the same memcache
    server, so you could use the user's unique id as the hash value.(more...)

src/n/u/nudge-HEAD/examples/cache/exposed.py   nudge(Download)
import memcache
 
mc = memcache.Client(['127.0.0.1:11211'], debug=0)
 
def index():

src/g/a/gae-twitter-oauth-example-HEAD/werkzeug/contrib/cache.py   gae-twitter-oauth-example(Download)
            # client.  Whenever pickle fails you get a weird AttributError.
            if is_cmemcache:
                client = memcache.Client(map(str, servers))
                try:
                    client.debuglog = lambda *a: None
                except:
                    pass
            else:
                client = memcache.Client(servers, False, HIGHEST_PROTOCOL)

src/l/i/listy-django-cache-0.9.0/listy/list_cache.py   listy-django-cache(Download)
        self.address = ('%s:11211' % address()) if callable(address) else address
 
        self.mc = memcache.Client([self.address],
                                  pickleProtocol=pickle.HIGHEST_PROTOCOL,
                                  pickler=self.pickler, unpickler=self.pickler)
 
        self.caches_mc = memcache.Client([self.address],

src/m/a/mage-HEAD/examples/blogs/app.py   mage(Download)
 
import mage
from memcache import Client
from insanities.ext.auth import CookieAuth
from insanities.templates import jinja2, Template
static = web.static_files(cfg.rel('static'))
db_maker = mage.sqla.construct_maker(cfg.DATABASES)
memcache_client = Client(cfg.MEMCACHED)
auth = CookieAuth(models.User.by_credential, models.User.by_id, memcache_client)
template = Template(cfg.TEMPLATES, jinja2.TEMPLATE_DIR, engines={'html': jinja2.TemplateEngine})

src/l/i/listy-django-cache-HEAD/listy/list_cache.py   listy-django-cache(Download)
        self.address = ('%s:11211' % address()) if callable(address) else address
 
        self.mc = memcache.Client([self.address],
                                  pickleProtocol=pickle.HIGHEST_PROTOCOL,
                                  pickler=self.pickler, unpickler=self.pickler)
 
        self.caches_mc = memcache.Client([self.address],

src/h/u/hunch-sample-app-HEAD/django/core/cache/backends/memcached.py   hunch-sample-app(Download)
    def __init__(self, server, params):
        BaseCache.__init__(self, params)
        self._cache = memcache.Client(server.split(';'))
 
    def _get_memcache_timeout(self, timeout):

src/l/i/listy-django-cache-0.9.0/listy/on_demand_pickle.py   listy-django-cache(Download)
            address = sys.argv[3] if count == 4 else '127.0.0.1:11211'
            import memcache
            mc = memcache.Client([address],
                                 pickleProtocol=pickle.HIGHEST_PROTOCOL,
                                 pickler=OnDemandPickle,

src/w/e/WebBot-HEAD/webbot/examples/test_memcache.py   WebBot(Download)
from time import sleep
from random import random
import memcache
 
mc = memcache.Client(['127.0.0.1:11211'])

src/w/e/WebBot-HEAD/webbot/examples/read_cache.py   WebBot(Download)
from time import sleep
import memcache
 
mc = memcache.Client(['127.0.0.1:11211'])
 

src/l/i/listy-django-cache-HEAD/listy/on_demand_pickle.py   listy-django-cache(Download)
            address = sys.argv[3] if count == 4 else '127.0.0.1:11211'
            import memcache
            mc = memcache.Client([address],
                                 pickleProtocol=pickle.HIGHEST_PROTOCOL,
                                 pickler=OnDemandPickle,

  1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9  Next