module documentation

Memcache client protocol. Memcached is a caching server, storing data in the form of pairs key/value, and memcache is the protocol to talk with it.

To connect to a server, create a factory for MemCacheProtocol:

    from twisted.internet import reactor, protocol
    from twisted.protocols.memcache import MemCacheProtocol, DEFAULT_PORT
    d = protocol.ClientCreator(reactor, MemCacheProtocol
        ).connectTCP("localhost", DEFAULT_PORT)
    def doSomething(proto):
        # Here you call the memcache operations
        return proto.set("mykey", "a lot of data")

All the operations of the memcache protocol are present, but MemCacheProtocol.set and MemCacheProtocol.get are the more important.

See for more information about the protocol.

Class Command Wrap a client action into an object, that holds the values used in the protocol.
Class MemCacheProtocol MemCache protocol: connect to a memcached server to store/retrieve values.
Exception ClientError Error caused by an invalid client call.
Exception NoSuchCommand Exception raised when a non existent command is called.
Exception ServerError Problem happening on the server.
Constant DEFAULT_PORT Undocumented
DEFAULT_PORT: int = (source)