summaryrefslogtreecommitdiff
path: root/doc
diff options
context:
space:
mode:
authordormando <dormando@rydia.net>2023-03-08 17:30:53 -0800
committerdormando <dormando@rydia.net>2023-03-11 18:19:23 -0800
commitc04701654413719d4abd7645c6d7b3fba4255e85 (patch)
treed415716c5ce3f9290c473bd5e82df4884bd5ab1d /doc
parentaef5b580a5b1528cd418433857adfd7a87f1b4e4 (diff)
downloadmemcached-c04701654413719d4abd7645c6d7b3fba4255e85.tar.gz
meta: N flag changes append/prepend. ms s flag.
Sending 's' flag to metaset now returns the size of the item stored. Useful if you want to know how large an append/prepended item now is. If the 'N' flag is supplied while in append/prepend mode, allows autovivifying (with exptime supplied from N) for append/prepend style keys that don't need headers created first.
Diffstat (limited to 'doc')
-rw-r--r--doc/protocol.txt10
1 files changed, 10 insertions, 0 deletions
diff --git a/doc/protocol.txt b/doc/protocol.txt
index acb837c..8a261ed 100644
--- a/doc/protocol.txt
+++ b/doc/protocol.txt
@@ -726,8 +726,10 @@ The flags used by the 'ms' command are:
- k: return key as a token
- O(token): opaque value, consumes a token and copies back with response
- q: use noreply semantics for return codes
+- s: return the size of the stored item on success (ie; new size on append)
- T(token): Time-To-Live for item, see "Expiration" above.
- M(token): mode switch to change behavior to add, replace, append, prepend
+- N(token): if in append mode, autovivify on miss with supplied TTL
The flags are now repeated with detailed information where useful:
@@ -775,6 +777,14 @@ S: "set" command. The default mode, added for completeness.
The "cas" command is supplanted by specifying the cas value with the 'C' flag.
Append and Prepend modes will also respect a supplied cas value.
+- N(token): if in append mode, autovivify on miss with supplied TTL
+
+Append and Prepend modes normally ignore the T argument, as they cannot create
+a new item on a miss. If N is supplied, and append reaches a miss, it will
+create a new item seeded with the data from the append command. It uses the
+TTL from N instead of T to be consistent with the usage of N in other
+commands.
+
Meta Delete
-----------