diff --git a/reference/memcached/constants.xml b/reference/memcached/constants.xml
index 6296564f1e..778c181969 100644
--- a/reference/memcached/constants.xml
+++ b/reference/memcached/constants.xml
@@ -323,6 +323,41 @@
+
+ Memcached::HAVE_MSGPACK
+
+ Indicates whether msgpack serializer support is available.
+ Type: boolean.
+ Available as of Memcached 3.0.0.
+
+
+
+
+ Memcached::HAVE_SESSION
+
+ Type: boolean.
+ Available as of Memcached 3.0.0.
+
+
+
+
+ Memcached::HAVE_SASL
+
+ Type: boolean.
+ Available as of Memcached 3.0.0.
+
+
+
+
+ Memcached::GET_EXTENDED
+
+ A flag for Memcached::get, Memcached::getMulti and
+ Memcached::getMultiByKey to ensure that the CAS token values
+ are returned as well.
+ Available as of Memcached 3.0.0.
+
+
+
Memcached::GET_PRESERVE_ORDER
@@ -484,6 +519,55 @@
+
+ Memcached::RES_AUTH_PROBLEM
+
+ Available as of Memcached 3.0.0.
+
+
+
+
+ Memcached::RES_AUTH_FAILURE
+
+ Available as of Memcached 3.0.0.
+
+
+
+
+ Memcached::RES_AUTH_CONTINUE
+
+ Available as of Memcached 3.0.0.
+
+
+
+
+ Memcached::RES_E2BIG
+
+ Available as of Memcached 3.0.0.
+
+
+
+
+ Memcached::RES_KEY_TOO_BIG
+
+ Available as of Memcached 3.0.0.
+
+
+
+
+ Memcached::RES_SERVER_TEMPORARILY_DISABLED
+
+ Available as of Memcached 3.0.0.
+
+
+
+
+ Memcached::RES_SERVER_MEMORY_ALLOCATION_FAILURE
+
+ Available as of Memcached 3.0.0.
+
+
+
diff --git a/reference/memcached/memcached/get.xml b/reference/memcached/memcached/get.xml
index b2f42e8af6..5570f78df6 100644
--- a/reference/memcached/memcached/get.xml
+++ b/reference/memcached/memcached/get.xml
@@ -13,13 +13,13 @@
publicmixedMemcached::getstringkeycallablecache_cb
- floatcas_token
+ int$flagsMemcached::get returns the item that was previously
stored under the key. If the item is found and
- cas_token variable is provided, it will contain the
- CAS token value for the item. See
+ for flags is given Memcached::GET_EXTENDED,
+ it will return the CAS token value for the item. See
Memcached::cas for how to use CAS tokens. Read-through caching callback may be
specified via cache_cb parameter.
@@ -49,10 +49,11 @@
- cas_token
+ flags
- The variable to store the CAS token in.
+ Flags to control the returned result. When value of Memcached::GET_EXTENDED
+ is given will return the CAS token.
@@ -116,6 +117,29 @@ if (!($ip = $m->get('ip_block'))) {
+
+ &reftitle.changelog;
+
+
+
+
+ &Version;
+ &Description;
+
+
+
+
+ 3.0.0
+
+ The cas_token parameter was removed.
+ Instead flags was added and when it is given the value of Memcached::GET_EXTENDED it will ensure the CAS token to be fetched.
+
+
+
+
+
+
+
&reftitle.seealso;
diff --git a/reference/memcached/memcached/getbykey.xml b/reference/memcached/memcached/getbykey.xml
index aad47cdbd5..1eaf95ee74 100644
--- a/reference/memcached/memcached/getbykey.xml
+++ b/reference/memcached/memcached/getbykey.xml
@@ -14,7 +14,7 @@
stringserver_keystringkeycallablecache_cb
- floatcas_token
+ intflagsMemcached::getByKey is functionally equivalent to
@@ -53,10 +53,11 @@
- cas_token
+ flags
- The variable to store the CAS token in.
+ Flags to control the returned result. When value of Memcached::GET_EXTENDED
+ is given will return the CAS token.
@@ -73,6 +74,29 @@
+
+ &reftitle.changelog;
+
+
+
+
+ &Version;
+ &Description;
+
+
+
+
+ 3.0.0
+
+ The cas_token parameter was removed.
+ Instead flags was added and when it is given the value of Memcached::GET_EXTENDED it will ensure the CAS token to be fetched.
+
+
+
+
+
+
+
&reftitle.seealso;
diff --git a/reference/memcached/memcached/getmulti.xml b/reference/memcached/memcached/getmulti.xml
index 07d97bfb25..e5df9996a3 100644
--- a/reference/memcached/memcached/getmulti.xml
+++ b/reference/memcached/memcached/getmulti.xml
@@ -12,32 +12,30 @@
publicmixedMemcached::getMultiarraykeys
- arraycas_tokensintflagsMemcached::getMulti is similar to
Memcached::get, but instead of a single key
item, it retrieves multiple items the keys of which are specified in the
- keys array. If cas_tokens
- variable is provided, it is filled with the CAS token values for the found
- items.
+ keys array.
- Unlike Memcached::get it is not possible to
- specify a read-through cache callback for
- Memcached::getMulti, because the memcache protocol
- does not provide information on which keys were not found in the multi-key
- request.
+ Before v3.0 a second argument cas_tokens was in use.
+ It was filled with the CAS token values for the found items.
+ The cas_tokens parameter was removed in v3.0 of the extension.
+ It was replaced with a new flag Memcached::GET_EXTENDED
+ that needs is to be used as the value for flags.
The flags parameter can be used to specify
- additional options for Memcached::getMulti. Currently,
- the only available option is
- Memcached::GET_PRESERVE_ORDER that ensures that the
+ additional options for Memcached::getMulti.
+ Memcached::GET_PRESERVE_ORDER ensures that the
keys are returned in the same order as they were requested in.
+ Memcached::GET_EXTENDED ensures that the
+ CAS tokens will be fetched too.
@@ -53,14 +51,6 @@
-
- cas_tokens
-
-
- The variable to store the CAS tokens for the found items.
-
-
- flags
@@ -85,10 +75,48 @@
&reftitle.examples;
- Memcached::getMulti example
+ Memcached::getMulti example for Memcached v3
addServer('localhost', 11211);
+
+$items = array(
+ 'key1' => 'value1',
+ 'key2' => 'value2',
+ 'key3' => 'value3'
+);
+$m->setMulti($items);
+$result = $m->getMulti(array('key1', 'key3', 'badkey'));
+var_dump($result);
+?>
+]]>
+
+ &example.outputs.similar;
+
+
+ string(6) "value1"
+ ["key3"]=>
+ string(6) "value3"
+}
+]]>
+
+
+
+
+
+
+ Memcached::getMulti example for Memcached v1 and v2
+
+addServer('localhost', 11211);
@@ -122,12 +150,60 @@ array(2) {
+
- Memcached::GET_PRESERVE_ORDER example
+ Memcached::GET_PRESERVE_ORDER example for Memcached v3
addServer('localhost', 11211);
+
+$data = array(
+ 'foo' => 'foo-data',
+ 'bar' => 'bar-data',
+ 'baz' => 'baz-data',
+ 'lol' => 'lol-data',
+ 'kek' => 'kek-data',
+);
+
+$m->setMulti($data, 3600);
+
+$keys = array_keys($data);
+$keys[] = 'zoo';
+$got = $m->getMulti($keys, Memcached::GET_PRESERVE_ORDER);
+
+foreach ($got as $k => $v) {
+ echo "$k $v\n";
+}
+?>
+]]>
+
+ &example.outputs.similar;
+
+
+
+
+
+
+
+
+ Memcached::GET_PRESERVE_ORDER example for Memcached v1 and v2
+
+addServer('localhost', 11211);
@@ -167,6 +243,29 @@ zoo
+
+ &reftitle.changelog;
+
+
+
+
+ &Version;
+ &Description;
+
+
+
+
+ 3.0.0
+
+ The cas_tokens parameter was removed.
+ The Memcached::GET_EXTENDED was added and when passed as a flag it ensures the CAS tokens to be fetched.
+
+
+
+
+
+
+
&reftitle.seealso;
diff --git a/reference/memcached/memcached/getmultibykey.xml b/reference/memcached/memcached/getmultibykey.xml
index 178bc29a9a..101afc3271 100644
--- a/reference/memcached/memcached/getmultibykey.xml
+++ b/reference/memcached/memcached/getmultibykey.xml
@@ -13,7 +13,6 @@
publicarrayMemcached::getMultiByKeystringserver_keyarraykeys
- stringcas_tokensintflags
@@ -44,14 +43,6 @@
-
- cas_tokens
-
-
- The variable to store the CAS tokens for the found items.
-
-
- flags
@@ -72,6 +63,29 @@
+
+ &reftitle.changelog;
+
+
+
+
+ &Version;
+ &Description;
+
+
+
+
+ 3.0.0
+
+ The cas_tokens parameter was removed.
+ The Memcached::GET_EXTENDED was added and when passed as a flag it ensures the CAS tokens to be fetched.
+
+
+
+
+
+
+
&reftitle.seealso;