diff options
author | Paul Lindner <plindner@hi5.com> | 2007-10-03 23:45:44 +0000 |
---|---|---|
committer | Paul Lindner <plindner@hi5.com> | 2007-10-03 23:45:44 +0000 |
commit | 6091c6dea75b4a6c67dc4777ca77d3d29c65b9ca (patch) | |
tree | bb115921d5c53c24a297c1dc7b0a8b0e7508fd9f /doc | |
parent | 52d1cf20b73013064578a03d4126f47b44a8635c (diff) | |
download | memcached-6091c6dea75b4a6c67dc4777ca77d3d29c65b9ca.tar.gz |
update for prepend operation, thread safe version from Maxim replacing Filipe's implementation
git-svn-id: http://code.sixapart.com/svn/memcached/trunk/server@627 b0b603af-a30f-0410-a34e-baf09ae79d0b
Diffstat (limited to 'doc')
-rw-r--r-- | doc/protocol.txt | 14 |
1 files changed, 9 insertions, 5 deletions
diff --git a/doc/protocol.txt b/doc/protocol.txt index 2543737..41cc9a7 100644 --- a/doc/protocol.txt +++ b/doc/protocol.txt @@ -53,8 +53,8 @@ Commands There are three types of commands. -Storage commands (there are five: "set", "add", "replace", "append" -and "cas") ask the server to store some data identified by a key. The +Storage commands (there are six: "set", "add", "replace", "append" +"prepend" and "cas") ask the server to store some data identified by a key. The client sends a command line, and then a data block; after that the client expects one line of response, which will indicate success or faulure. @@ -126,9 +126,9 @@ Storage commands First, the client sends a command line which looks like this: -<command name> <key> <flags> <exptime> <bytes> [<unqiue>]\r\n +<command name> <key> <flags> <exptime> <bytes> [<cas unqiue>]\r\n -- <command name> is "set", "add", "replace", "append", or "cas" +- <command name> is "set", "add", "replace", "append", "prepend", or "cas" "set" means "store this data". @@ -138,7 +138,9 @@ First, the client sends a command line which looks like this: "replace" means "store this data, but only if the server *does* already hold data for this key". - "append" means "add this data to an existing key". + "append" means "add this data to an existing key after existing data". + + "prepend" means "add this data to an existing key before existing data". "cas" is a check and set operation which means "store this data but only if no one else has updated since I last fetched it." @@ -165,6 +167,8 @@ First, the client sends a command line which looks like this: it's followed by an empty data block). - <cas unique> is a unique 64-bit value of an existing entry. + Clients should use the value returned from the "gets" command + when issuing "cas" updates. After this line, the client sends the data block: |