X-Git-Url: https://git.m6w6.name/?a=blobdiff_plain;f=libmemcached%2Fmemcached_cas.html;h=8b49c346b7126638de8eb71e8c76789d8130044f;hb=ab49ea140f9b5ce85e5b66ea50225d163c18e7e3;hp=fdd8d6aed13b266785c45d7b601ca927188b1ce4;hpb=d517b40976d8e986cada6b8b896e8f12cd179fa6;p=awesomized%2Flibmemcached diff --git a/libmemcached/memcached_cas.html b/libmemcached/memcached_cas.html index fdd8d6ae..8b49c346 100644 --- a/libmemcached/memcached_cas.html +++ b/libmemcached/memcached_cas.html @@ -8,7 +8,7 @@ -
libmemcached
-libmemcachedutil
- -libhashkit
- -Client Applications
- -Copyright
@@ -179,6 +167,10 @@Compile and link with -lmemcached
-memcached_cas
(memcached_st *ptr, const char *key, size_t key_length, const char *value, size_t value_length, time_t expiration, uint32_t flags, uint64_t cas)¶memcached_cas
(memcached_st *ptr, const char *key, size_t key_length, const char *value, size_t value_length, time_t expiration, uint32_t flags, uint64_t cas)¶memcached_cas_by_key
(memcached_st *ptr, const char *group_key, size_t group_key_length, const char *key, size_t key_length, const char *value, size_t value_length, time_t expiration, uint32_t flags, uint64_t cas)¶memcached_cas_by_key
(memcached_st *ptr, const char *group_key, size_t group_key_length, const char *key, size_t key_length, const char *value, size_t value_length, time_t expiration, uint32_t flags, uint64_t cas)¶Parameters: |
|
+
---|---|
Returns: |
|
+
memcached_cas()
overwrites data in the server as long as the cas
value is
still the same in the server. You can get the cas
value of a result by
calling memcached_result_cas()
on a memcached_result_st
structure.
At the point that this note was written cas is still buggy in memcached. Turning
-on tests for it in libmemcached
is optional. Please see memcached_set()
for
-information on how to do this.
memcached_cas_by_key()
method behaves in a similar way as the non key methods.
The difference is that it uses the group_key
parameter to map objects to
particular servers.
memcached_cas()
is tested with the MEMCACHED_BEHAVIOR_USE_UDP
behavior
+
memcached_cas()
is tested with the MEMCACHED_BEHAVIOR_USE_UDP
behavior
enabled. However, when using these operations with this behavior on, there are
limits to the size of the payload being sent to the server. The reason for
these limits is that the Memcached Server does not allow multi-datagram requests
@@ -228,7 +240,7 @@ and the current server implementation sets a datagram size to 1400 bytes. Due to
protocol overhead, the actual limit of the user supplied data is less than 1400
bytes and depends on the protocol in use as, well as the operation being
executed. When running with the binary protocol,
-MEMCACHED_BEHAVIOR_BINARY_PROTOCOL
, the size of the key,value, flags and
+MEMCACHED_BEHAVIOR_BINARY_PROTOCOL
, the size of the key,value, flags and
expiry combined may not exceed 1368 bytes. When running with the ASCII protocol,
the exact limit fluctuates depending on which function is being executed and
whether the function is a cas operation or not. For non-cas ASCII set
@@ -248,11 +260,11 @@ string.