Pymemcache Readthedocs Io en Latest
Pymemcache Readthedocs Io en Latest
Release 3.5.2
1 Getting started! 3
2 pymemcache 11
3 Changelog 27
Index 37
i
ii
pymemcache Documentation, Release 3.5.2
Contents:
CONTENTS 1
pymemcache Documentation, Release 3.5.2
2 CONTENTS
CHAPTER
ONE
GETTING STARTED!
client = Client('localhost')
client.set('some_key', 'some_value')
result = client.get('some_key')
ipv4_client = Client('127.0.0.1')
ipv4_client_with_port = Client('127.0.0.1:11211')
ipv4_client_using_tuple = Client(('127.0.0.1', 11211))
ipv6_client = Client('[::1]')
ipv6_client_with_port = Client('[::1]:11211')
ipv6_client_using_tuple = Client(('::1', 11211))
domain_client = Client('localhost')
domain_client_with_port = Client('localhost:11211')
domain_client_using_tuple = Client(('localhost', 11211))
Note that IPv6 may be used in preference to IPv4 when passing a domain name as the host if an IPv6 address can be
resolved for that domain.
You can also connect to a local memcached server over a UNIX domain socket by passing the socket’s path to the
client’s server parameter. An optional unix: prefix may be used for compatibility in code that uses other client
libraries that require it.
client = Client('/run/memcached/memcached.sock')
client_with_prefix = Client('unix:/run/memcached/memcached.sock')
3
pymemcache Documentation, Release 3.5.2
pymemcache.client.base.PooledClient is a thread-safe client pool that provides the same API as pymemcache.
client.base.Client. It’s useful in for cases when you want to maintain a pool of already-connected clients for
improved performance.
This will use a consistent hashing algorithm to choose which server to set/get the values from. It will also automatically
rebalance depending on if a server goes down.
client = HashClient([
'127.0.0.1:11211',
'127.0.0.1:11212',
])
client.set('some_key', 'some value')
result = client.get('some_key')
Key distribution is handled by the hasher argument in the constructor. The default is the built-in pymemcache.
client.rendezvous.RendezvousHash hasher. It uses the built-in pymemcache.client.murmur3.murmur3_32
implementation to distribute keys on servers. Overriding these two parts can be used to change how keys are distributed.
Changing the hashing algorithm can be done by setting the hash_function argument in the RendezvousHash con-
structor.
Rebalancing in the pymemcache.client.hash.HashClient functions as follows:
1. A pymemcache.client.hash.HashClient is created with 3 nodes, node1, node2 and node3.
2. A number of values are set in the client using set and set_many. Example:
• key1 -> node2
• key2 -> node3
• key3 -> node3
• key4 -> node1
• key5 -> node2
3. Subsequent get calls will hash to the correct server and requests are routed accordingly.
4. node3 goes down.
5. The hashclient tries to get("key2") but detects the node as down. This causes it to mark the node as down.
Removing it from the hasher. The hasclient can attempt to retry the operation based on the retry_attempts
and retry_timeout arguments. If ignore_exc is set, this is treated as a miss, if not, an exception will be
raised.
6. Any get/set for key2 and key3 will now hash differently, example:
• key2 -> node2
The library comes with retry mechanisms that can be used to wrap all kinds of pymemcache clients. The wrapper allows
you to define the exceptions that you want to handle with retries, which exceptions to exclude, how many attempts to
make and how long to wait between attempts.
The RetryingClient wraps around any of the other included clients and will have the same methods. For this example,
we’re just using the base Client.
The above client will attempt each call three times with a wait of 10ms between each attempt, as long as the exception
is a MemcacheUnexpectedCloseError.
Memcached supports authentication and encryption via TLS since version 1.5.13.
A Memcached server running with TLS enabled will only accept TLS connections.
To enable TLS in pymemcache, pass a valid TLS context to the client’s tls_context parameter:
import ssl
from pymemcache.client.base import Client
context = ssl.create_default_context(
cafile="my-ca-root.crt",
)
1.6 Serialization
import json
from pymemcache.client.base import Client
class JsonSerde(object):
def serialize(self, key, value):
if isinstance(value, str):
return value, 1
return json.dumps(value), 2
class Foo(object):
pass
The serializer uses the highest pickle protocol available. In order to make sure multiple versions of Python can read
the protocol version, you can specify the version by explicitly instantiating pymemcache.serde.PickleSerde:
Values passed to the serde.deserialize() method will be bytestrings. It is therefore necessary to encode and decode
them correctly. Here’s a version of the JsonSerde from above which is more careful with encodings:
class JsonSerde(object):
def serialize(self, key, value):
if isinstance(value, str):
return value.encode('utf-8'), 1
return json.dumps(value).encode('utf-8'), 2
For testing purpose pymemcache can be used in an interactive mode by using the python interpreter or again ipython
and tools like tox.
One main advantage of using tox to interact with pymemcache is that it comes with its own virtual environments. It
will automatically install pymemcache and fetch all the needed requirements at run. See the example below:
You can instantiate all the classes and clients offered by pymemcache.
Your client will remain open until you decide to close it or until you decide to quit your interpreter. It can allow you to
see what happens if your server is abruptly closed. Below is an example.
Starting your server:
The previous client is still open, now try to retrieve some keys:
>>> print(client.get('some_key'))
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/home/user/pymemcache/pymemcache/client/base.py", line 535, in get
return self._fetch_cmd(b'get', [key], False).get(key, default)
File "/home/user/pymemcache/pymemcache/client/base.py", line 910, in _fetch_cmd
buf, line = _readline(self.sock, buf)
File "/home/user/pymemcache/pymemcache/client/base.py", line 1305, in _readline
raise MemcacheUnexpectedCloseError()
pymemcache.exceptions.MemcacheUnexpectedCloseError
b'some_value'
This kind of usage is useful for debug sessions or to dig manually into your server.
This client implements the ASCII protocol of memcached. This means keys should not contain any of the following
illegal characters:
Keys cannot have spaces, new lines, carriage returns, or null characters. We suggest that if you have
unicode characters, or long keys, you use an effective hashing mechanism before calling this client.
At Pinterest, we have found that murmur3 hash is a great candidate for this. Alternatively you can set al-
low_unicode_keys to support unicode keys, but beware of what unicode encoding you use to make sure multiple clients
can find the same key.
• Always set the connect_timeout and timeout arguments in the pymemcache.client.base.Client con-
structor to avoid blocking your process when memcached is slow. You might also want to enable the no_delay
option, which sets the TCP_NODELAY flag on the connection’s socket.
• Use the noreply flag for a significant performance boost. The noreply flag is enabled by default for “set”,
“add”, “replace”, “append”, “prepend”, and “delete”. It is disabled by default for “cas”, “incr” and “decr”. It
obviously doesn’t apply to any get calls.
• Use pymemcache.client.base.Client.get_many() and pymemcache.client.base.Client.
gets_many() whenever possible, as they result in fewer round trip times for fetching multiple keys.
• Use the ignore_exc flag to treat memcache/network errors as cache misses on calls to the get* methods. This
prevents failures in memcache, or network errors, from killing your web requests. Do not use this flag if you
need to know about errors from memcache, and make sure you have some other way to detect memcache server
failures.
• Unless you have a known reason to do otherwise, use the provided serializer in pymemcache.serde.pickle_serde
for any de/serialization of objects.
Warning: noreply will not read errors returned from the memcached server.
If a function with noreply=True causes an error on the server, it will still succeed and your next call which reads
a response from memcached may fail unexpectedly.
pymemcached will try to catch and stop you from sending malformed inputs to memcached, but if you are having
unexplained errors, setting noreply=False may help you troubleshoot the issue.
TWO
PYMEMCACHE
2.1.1 Subpackages
pymemcache.client package
Submodules
pymemcache.client.base module
11
pymemcache Documentation, Release 3.5.2
Keys must have a __str__() method which should return a str with no more than 250 ASCII characters
and no whitespace or control characters. Unicode strings must be encoded (as UTF-8, for example)
unless they consist only of ASCII characters that are neither whitespace nor control characters.
Values must have a __str__() method to convert themselves to a byte string. Unicode objects can be a
problem since str() on a Unicode object will attempt to encode it as ASCII (which will fail if the value
contains code points larger than U+127). You can fix this with a serializer or by just calling encode
on the string (using UTF-8, for instance).
If you intend to use anything but str as a value, it is a good idea to use a serializer. The pymem-
cache.serde library has an already implemented serializer which pickles and unpickles data.
Serialization and Deserialization
The constructor takes an optional object, the “serializer/deserializer” (“serde”), which is responsible
for both serialization and deserialization of objects. That object must satisfy the serializer interface by
providing two methods: serialize and deserialize. serialize takes two arguments, a key and a value,
and returns a tuple of two elements, the serialized value, and an integer in the range 0-65535 (the
“flags”). deserialize takes three parameters, a key, value, and flags, and returns the deserialized value.
Here is an example using JSON for non-str values:
class JSONSerde(object):
def serialize(self, key, value):
if isinstance(value, str):
return value, 1
return json.dumps(value), 2
if flags == 2:
return json.loads(value)
Note: Most write operations allow the caller to provide a flags value to support advanced interaction with the
server. This will override the “flags” value returned by the serializer and should therefore only be used when
you have a complete understanding of how the value should be serialized, stored, and deserialized.
Error Handling
All of the methods in this class that talk to memcached can throw one of the following exceptions:
• pymemcache.exceptions.MemcacheUnknownCommandError
• pymemcache.exceptions.MemcacheClientError
• pymemcache.exceptions.MemcacheServerError
• pymemcache.exceptions.MemcacheUnknownError
• pymemcache.exceptions.MemcacheUnexpectedCloseError
• pymemcache.exceptions.MemcacheIllegalInputError
• socket.timeout
• socket.error
12 Chapter 2. pymemcache
pymemcache Documentation, Release 3.5.2
Instances of this class maintain a persistent connection to memcached which is terminated when any
of these exceptions are raised. The next call to a method on the object will result in a new connection
being made to memcached.
add(key: Union[bytes, str], value: Any, expire: int = 0, noreply: Optional[bool] = None, flags: Optional[int]
= None) → bool
The memcached “add” command.
Parameters
• key – str, see class docs for details.
• value – str, see class docs for details.
• expire – optional int, number of seconds until the item is expired from the cache, or zero
for no expiry (the default).
• noreply – optional bool, True to not wait for the reply (defaults to self.default_noreply).
• flags – optional int, arbitrary bit field used for server-specific flags
Returns
If noreply is True (or if it is unset and self.default_noreply is True), the return value
is always True. Otherwise the return value is True if the value was stored, and False if it was
not (because the key already existed).
append(key: Union[bytes, str], value, expire: int = 0, noreply: Optional[bool] = None, flags: Optional[int] =
None) → bool
The memcached “append” command.
Parameters
• key – str, see class docs for details.
• value – str, see class docs for details.
• expire – optional int, number of seconds until the item is expired from the cache, or zero
for no expiry (the default).
• noreply – optional bool, True to not wait for the reply (defaults to self.default_noreply).
• flags – optional int, arbitrary bit field used for server-specific flags
Returns
True.
cache_memlimit(memlimit) → bool
The memcached “cache_memlimit” command.
Parameters
memlimit – int, the number of megabytes to set as the new cache memory limit.
Returns
If no exception is raised, always returns True.
cas(key, value, cas, expire: int = 0, noreply=False, flags: Optional[int] = None) → Optional[bool]
The memcached “cas” command.
Parameters
• key – str, see class docs for details.
• value – str, see class docs for details.
• cas – int or str that only contains the characters ‘0’-‘9’.
• expire – optional int, number of seconds until the item is expired from the cache, or zero
for no expiry (the default).
• noreply – optional bool, False to wait for the reply (the default).
• flags – optional int, arbitrary bit field used for server-specific flags
Returns
If noreply is True (or if it is unset and self.default_noreply is True), the return value
is always True. Otherwise returns None if the key didn’t exist, False if it existed but had a
different cas value and True if it existed and was changed.
check_key(key: Union[bytes, str], key_prefix: bytes) → bytes
Checks key and add key_prefix.
close() → None
Close the connection to memcached, if it is open. The next call to a method that requires a connection will
re-open it.
decr(key: Union[bytes, str], value: int, noreply: Optional[bool] = False) → Optional[int]
The memcached “decr” command.
Parameters
• key – str, see class docs for details.
• value – int, the amount by which to decrement the value.
• noreply – optional bool, False to wait for the reply (the default).
Returns
If noreply is True, always returns None. Otherwise returns the new value of the key, or None
if the key wasn’t found.
delete(key: Union[bytes, str], noreply: Optional[bool] = None) → bool
The memcached “delete” command.
Parameters
• key – str, see class docs for details.
• noreply – optional bool, True to not wait for the reply (defaults to self.default_noreply).
Returns
If noreply is True (or if it is unset and self.default_noreply is True), the return value
is always True. Otherwise returns True if the key was deleted, and False if it wasn’t found.
delete_many(keys: Iterable[Union[bytes, str]], noreply: Optional[bool] = None) → bool
A convenience function to delete multiple keys.
Parameters
• keys – list(str), the list of keys to delete.
• noreply – optional bool, True to not wait for the reply (defaults to self.default_noreply).
Returns
True. If an exception is raised then all, some or none of the keys may have been deleted.
Otherwise all the keys have been sent to memcache for deletion and if noreply is False, they
have been acknowledged by memcache.
14 Chapter 2. pymemcache
pymemcache Documentation, Release 3.5.2
16 Chapter 2. pymemcache
pymemcache Documentation, Release 3.5.2
• expire – optional int, number of seconds until the item is expired from the cache, or zero
for no expiry (the default).
• noreply – optional bool, True to not wait for the reply (defaults to self.default_noreply).
• flags – optional int, arbitrary bit field used for server-specific flags
Returns
Returns a list of keys that failed to be inserted. If noreply is True, always returns empty list.
set_multi(values: Dict[Union[bytes, str], Any], expire: int = 0, noreply: Optional[bool] = None, flags:
Optional[int] = None) → List[Union[bytes, str]]
A convenience function for setting multiple values.
Parameters
• values – dict(str, str), a dict of keys and values, see class docs for details.
• expire – optional int, number of seconds until the item is expired from the cache, or zero
for no expiry (the default).
• noreply – optional bool, True to not wait for the reply (defaults to self.default_noreply).
• flags – optional int, arbitrary bit field used for server-specific flags
Returns
Returns a list of keys that failed to be inserted. If noreply is True, always returns empty list.
shutdown(graceful: bool = False) → None
The memcached “shutdown” command.
This will request shutdown and eventual termination of the server, optionally preceded by a graceful stop
of memcached’s internal state machine. Note that the server needs to have been started with the shutdown
protocol command enabled with the –enable-shutdown flag.
Parameters
graceful – optional bool, True to request a graceful shutdown with SIGUSR1 (defaults to
False, i.e. SIGINT shutdown).
stats(*args)
The memcached “stats” command.
The returned keys depend on what the “stats” command returns. A best effort is made to convert values to
appropriate Python types, defaulting to strings when a conversion cannot be made.
Parameters
*arg – extra string arguments to the “stats” command. See the memcached protocol docu-
mentation for more information.
Returns
A dict of the returned stats.
touch(key: Union[bytes, str], expire: int = 0, noreply: Optional[bool] = None) → bool
The memcached “touch” command.
Parameters
• key – str, see class docs for details.
• expire – optional int, number of seconds until the item is expired from the cache, or zero
for no expiry (the default).
• noreply – optional bool, True to not wait for the reply (defaults to self.default_noreply).
18 Chapter 2. pymemcache
pymemcache Documentation, Release 3.5.2
Returns
True if the expiration time was updated, False if the key wasn’t found.
version() → bytes
The memcached “version” command.
Returns
A string of the memcached version.
class pymemcache.client.base.KeepaliveOpts(idle: int = 1, intvl: int = 1, cnt: int = 5)
Bases: object
A configuration structure to define the socket keepalive.
This structure must be passed to a client. The client will configure its socket keepalive by using the elements of
the structure.
Parameters
• idle – The time (in seconds) the connection needs to remain idle before TCP starts sending
keepalive probes. Should be a positive integer most greater than zero.
• intvl – The time (in seconds) between individual keepalive probes. Should be a positive
integer most greater than zero.
• cnt – The maximum number of keepalive probes TCP should send before dropping the
connection. Should be a positive integer most greater than zero.
cnt
idle
intvl
append(key, value, expire: int = 0, noreply: Optional[bool] = None, flags: Optional[int] = None)
disconnect_all() → None
prepend(key, value, expire: int = 0, noreply: Optional[bool] = None, flags: Optional[int] = None)
quit() → None
raw_command(command, end_tokens=b'\r\n')
replace(key, value, expire: int = 0, noreply: Optional[bool] = None, flags: Optional[int] = None)
set(key, value, expire: int = 0, noreply: Optional[bool] = None, flags: Optional[int] = None)
20 Chapter 2. pymemcache
pymemcache Documentation, Release 3.5.2
stats(*args)
version() → bytes
pymemcache.client.hash module
client_class
Client class used to create new clients
alias of Client
close()
disconnect_all()
quit() → None
pymemcache.client.murmur3 module
pymemcache.client.murmur3.murmur3_32(data, seed=0)
MurmurHash3 was written by Austin Appleby, and is placed in the public domain. The author hereby disclaims
copyright to this source code.
pymemcache.client.rendezvous module
get_node(key)
remove_node(node)
22 Chapter 2. pymemcache
pymemcache Documentation, Release 3.5.2
pymemcache.client.retrying module
Module contents
2.1.2 Submodules
pymemcache.exceptions module
exception pymemcache.exceptions.MemcacheClientError
Bases: MemcacheError
Raised when memcached fails to parse the arguments to a request, likely due to a malformed key and/or value, a
bug in this library, or a version mismatch with memcached.
exception pymemcache.exceptions.MemcacheError
Bases: Exception
Base exception class
exception pymemcache.exceptions.MemcacheIllegalInputError
Bases: MemcacheClientError
Raised when a key or value is not legal for Memcache (see the class docs for Client for more details).
exception pymemcache.exceptions.MemcacheServerError
Bases: MemcacheError
Raised when memcached reports a failure while processing a request, likely due to a bug or transient issue in
memcached.
exception pymemcache.exceptions.MemcacheUnexpectedCloseError
Bases: MemcacheServerError
Raised when the connection with memcached closes unexpectedly.
exception pymemcache.exceptions.MemcacheUnknownCommandError
Bases: MemcacheClientError
Raised when memcached fails to parse a request, likely due to a bug in this library or a version mismatch with
memcached.
exception pymemcache.exceptions.MemcacheUnknownError
Bases: MemcacheError
Raised when this library receives a response from memcached that it cannot parse, likely due to a bug in this
library or a version mismatch with memcached.
pymemcache.fallback module
A client for falling back to older memcached servers when performing reads.
It is sometimes necessary to deploy memcached on new servers, or with a different configuration. In these cases, it is
undesirable to start up an empty memcached server and point traffic to it, since the cache will be cold, and the backing
store will have a large increase in traffic.
This class attempts to solve that problem by providing an interface identical to the Client interface, but which can
fall back to older memcached servers when reads to the primary server fail. The approach for upgrading memcached
servers or configuration then becomes:
1. Deploy a new host (or fleet) with memcached, possibly with a new configuration.
2. From your application servers, use FallbackClient to write and read from the new cluster, and to read from the
old cluster when there is a miss in the new cluster.
3. Wait until the new cache is warm enough to support the load.
4. Switch from FallbackClient to a regular Client library for doing all reads and writes to the new cluster.
5. Take down the old cluster.
Best Practices:
• Make sure that the old client has “ignore_exc” set to True, so that it treats failures like cache misses. That will
allow you to take down the old cluster before you switch away from FallbackClient.
class pymemcache.fallback.FallbackClient(caches)
Bases: object
add(key, value, expire=0, noreply=True)
close()
Close each of the memcached clients
decr(key, value, noreply=True)
delete(key, noreply=True)
flush_all(delay=0, noreply=True)
get(key)
get_many(keys)
gets(key)
gets_many(keys)
quit()
24 Chapter 2. pymemcache
pymemcache Documentation, Release 3.5.2
stats()
pymemcache.pool module
property free
get()
get_and_release(destroy_on_fail=False) → Iterator[T]
property used
pymemcache.serde module
serialize(key, value)
serialize(key, value)
pymemcache.serde.get_python_memcache_serializer(pickle_version: int = 4)
Return a serializer using a specific pickle version
pymemcache.serde.python_memcache_deserializer(key, value, flags)
26 Chapter 2. pymemcache
CHAPTER
THREE
CHANGELOG
• Client.get returns the default when using ignore_exc and if memcached is unavailable
• Added noreply support to HashClient.flush_all.
27
pymemcache Documentation, Release 3.5.2
• Remove trailing space for commands that don’t take arguments, such as stats. This was a violation of the
memcached protocol.
• CAS operations will now raise MemcacheIllegalInputError when None is given as the cas value.
• Added IPv6 support for TCP socket connections. Note that IPv6 may be used in preference to IPv4 when passing
a domain name as the host if an IPv6 address can be resolved for that domain.
• HashClient now supports UNIX sockets.
• HashClient can now be imported from the top-level pymemcache package (e.g. pymemcache.HashClient).
• HashClient.get_many() now longer stores False for missing keys from unavailable clients. Instead, the
result won’t contain the key at all.
• Added missing HashClient.close() and HashClient.quit().
28 Chapter 3. Changelog
pymemcache Documentation, Release 3.5.2
• The serialization API has been reworked. Instead of consuming a serializer and deserializer as separate ar-
guments, client objects now expect an argument serde to be an object which implements serialize and
deserialize as methods. (serialize and deserialize are still supported but considered deprecated.)
• Validate integer inputs for expire, delay, incr, decr, and memlimit – non-integer values now raise
MemcacheIllegalInputError
• Validate inputs for cas – values which are not integers or strings of 0-9 now raise
MemcacheIllegalInputError
• Add prepend and append support to MockMemcacheClient.
• Add the touch method to HashClient.
• Added official support for Python 3.8.
• Public classes and exceptions can now be imported from the top-level pymemcache package (e.g. pymemcache.
Client). #197
• Add UNIX domain socket support and document server connection options. #206
• Add support for the cache_memlimit command. #211
• Commands key are now always sent in their original order. #209
30 Chapter 3. Changelog
pymemcache Documentation, Release 3.5.2
• Documentation improvements
• Fixed cachedump stats command, see #103
• Honor default_value in HashClient
• Unicode keys support. It is now possible to pass the flag allow_unicode_keys when creating the clients, thanks
@jogo!
• Fixed a bug where PooledClient wasn’t following default_noreply arg set on init, thanks @kols!
• Improved documentation
• Bug fix for the HashClient that corrects behavior when there are no working servers.
• Python 3 Support
• Introduced HashClient that uses consistent hasing for allocating keys across many memcached nodes. It also can
detect servers going down and rebalance keys across the available nodes.
• Retry sock.recv() when it raises EINTR
32 Chapter 3. Changelog
CHAPTER
FOUR
• genindex
• modindex
• search
33
pymemcache Documentation, Release 3.5.2
p
pymemcache, 26
pymemcache.client, 23
pymemcache.client.base, 11
pymemcache.client.hash, 21
pymemcache.client.murmur3, 22
pymemcache.client.rendezvous, 22
pymemcache.client.retrying, 23
pymemcache.exceptions, 23
pymemcache.fallback, 24
pymemcache.pool, 25
pymemcache.serde, 25
35
pymemcache Documentation, Release 3.5.2
37
pymemcache Documentation, Release 3.5.2
38 Index
pymemcache Documentation, Release 3.5.2
N R
normalize_server_spec() (in module pymem- raw_command() (pymemcache.client.base.Client
cache.client.base), 21 method), 16
raw_command() (pymemcache.client.base.PooledClient
O method), 20
ObjectPool (class in pymemcache.pool), 25 release() (pymemcache.pool.ObjectPool method), 25
remove_node() (pymem-
P cache.client.rendezvous.RendezvousHash
method), 22
PickleSerde (class in pymemcache.serde), 25
remove_server() (pymemcache.client.hash.HashClient
PooledClient (class in pymemcache.client.base), 19
method), 22
prepend() (pymemcache.client.base.Client method), 16
RendezvousHash (class in pymem-
prepend() (pymemcache.client.base.PooledClient
cache.client.rendezvous), 22
method), 20
replace() (pymemcache.client.base.Client method), 17
prepend() (pymemcache.client.hash.HashClient
replace() (pymemcache.client.base.PooledClient
method), 22
method), 20
prepend() (pymemcache.fallback.FallbackClient
replace() (pymemcache.client.hash.HashClient
method), 24
method), 22
pymemcache
replace() (pymemcache.fallback.FallbackClient
module, 26
method), 24
pymemcache.client
RetryingClient (class in pymemcache.client.retrying),
module, 23
23
pymemcache.client.base
module, 11 S
pymemcache.client.hash
serialize() (pymemcache.serde.CompressedSerde
module, 21
method), 25
pymemcache.client.murmur3
serialize() (pymemcache.serde.PickleSerde method),
module, 22
26
pymemcache.client.rendezvous
set() (pymemcache.client.base.Client method), 17
module, 22
set() (pymemcache.client.base.PooledClient method),
pymemcache.client.retrying
20
module, 23
set() (pymemcache.client.hash.HashClient method), 22
pymemcache.exceptions
set() (pymemcache.fallback.FallbackClient method), 25
module, 23
set_many() (pymemcache.client.base.Client method),
pymemcache.fallback
17
module, 24
set_many() (pymemcache.client.base.PooledClient
pymemcache.pool
method), 20
module, 25
set_many() (pymemcache.client.hash.HashClient
pymemcache.serde
method), 22
module, 25
set_multi() (pymemcache.client.base.Client method),
python_memcache_deserializer() (in module
18
pymemcache.serde), 26
set_multi() (pymemcache.client.base.PooledClient
python_memcache_serializer() (in module pymem-
method), 20
cache.serde), 26
set_multi() (pymemcache.client.hash.HashClient
Q method), 22
shutdown() (pymemcache.client.base.Client method),
quit() (pymemcache.client.base.Client method), 16 18
quit() (pymemcache.client.base.PooledClient method), shutdown() (pymemcache.client.base.PooledClient
20 method), 20
quit() (pymemcache.client.hash.HashClient method), stats() (pymemcache.client.base.Client method), 18
22
Index 39
pymemcache Documentation, Release 3.5.2
stats() (pymemcache.client.base.PooledClient
method), 20
stats() (pymemcache.fallback.FallbackClient method),
25
T
touch() (pymemcache.client.base.Client method), 18
touch() (pymemcache.client.base.PooledClient
method), 21
touch() (pymemcache.client.hash.HashClient method),
22
touch() (pymemcache.fallback.FallbackClient method),
25
U
used (pymemcache.pool.ObjectPool property), 25
V
version() (pymemcache.client.base.Client method), 19
version() (pymemcache.client.base.PooledClient
method), 21
40 Index