�
Ϫ�fc\ � �� � d Z ddlmZ ddlmZmZmZ ddlmZ ddl m
Z
ddlmZ ddl
mZmZ dZ G d � d
e� Z G d� de� Z G d
� de� Z G d� d� Z G d� dee
� Zg d�Zy)ap
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 L{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")
d.addCallback(doSomething)
reactor.run()
All the operations of the memcache protocol are present, but
L{MemCacheProtocol.set} and L{MemCacheProtocol.get} are the more important.
See U{http://code.sixapart.com/svn/memcached/trunk/server/doc/protocol.txt} for
more information about the protocol.
� )�deque)�Deferred�TimeoutError�fail)�LineReceiver)�TimeoutMixin)�log)�nativeString�
networkStringi�+ c � � e Zd ZdZy)�
NoSuchCommandzA
Exception raised when a non existent command is called.
N��__name__�
__module__�__qualname__�__doc__� � �</usr/lib/python3/dist-packages/twisted/protocols/memcache.pyr
r
( � � �r r
c � � e Zd ZdZy)�ClientErrorz1
Error caused by an invalid client call.
Nr r r r r r . r r r c � � e Zd ZdZy)�ServerErrorz*
Problem happening on the server.
Nr r r r r r 4 r r r c �" |