From da3714e6dc31ab2f9d115707ab79a838420c7b5a Mon Sep 17 00:00:00 2001 From: Brian Aker Date: Mon, 23 May 2011 18:36:22 -0700 Subject: [PATCH] Update documentation. --- docs/conf.py | 24 +++---- docs/hashkit_create.rst | 6 +- docs/hashkit_functions.rst | 39 +++++------ docs/hashkit_value.rst | 21 ++---- docs/include.am | 2 + docs/index.rst | 2 + docs/libhashkit.rst | 17 +---- docs/libmemcached_configuration.rst | 4 +- docs/libmemcached_examples.rst | 1 - docs/libmemcachedutil.rst | 11 +-- docs/memcached_analyze.rst | 20 ++---- docs/memcached_append.rst | 97 ++++++++++++++++++++++++++ docs/memcached_auto.rst | 4 +- docs/memcached_behavior.rst | 11 +-- docs/memcached_callback.rst | 9 +-- docs/memcached_cas.rst | 80 +++++++++++++++++++++ docs/memcached_create.rst | 3 - docs/memcached_delete.rst | 2 + docs/memcached_dump.rst | 26 ++----- docs/memcached_flush.rst | 1 + docs/memcached_flush_buffers.rst | 12 +--- docs/memcached_generate_hash_value.rst | 1 + docs/memcached_get.rst | 1 + docs/memcached_memory_allocators.rst | 39 ++++------- docs/memcached_quit.rst | 1 + docs/memcached_result_st.rst | 59 ++++++---------- docs/memcached_sasl.rst | 28 +++----- docs/memcached_server_st.rst | 1 + docs/memcached_servers.rst | 50 +++++-------- docs/memcached_set.rst | 41 +++-------- docs/memcached_stats.rst | 58 +++++---------- docs/memcached_strerror.rst | 34 +++------ docs/memcached_user_data.rst | 21 ++---- docs/memcached_verbosity.rst | 37 +++------- docs/memcached_version.rst | 43 +++--------- docs/memcapable.rst | 1 + docs/memerror.rst | 12 +--- 37 files changed, 380 insertions(+), 439 deletions(-) create mode 100644 docs/memcached_append.rst create mode 100644 docs/memcached_cas.rst diff --git a/docs/conf.py b/docs/conf.py index aff25aa7..9b05ccfd 100644 --- a/docs/conf.py +++ b/docs/conf.py @@ -228,12 +228,16 @@ man_pages = [ ('hashkit_functions', 'hashkit_hsieh', u'libhashkit Documentation', [u'Brian Aker'], 3), ('hashkit_value', 'hashkit_value', u'libhashkit Documentation', [u'Brian Aker'], 3), ('libmemcached', 'libmemcached', u'Introducing the C Client Library for memcached', [u'Brian Aker'], 3), - ('libmemcached_examples', 'libmemcached_examples', u'libmemcached Documentation', [u'Brian Aker'], 3), + ('libmemcached_configuration', 'libmemcached_check_configuration', u'libmemcached Documentation', [u'Brian Aker'], 3), ('libmemcached_configuration', 'libmemcached_configuration', u'libmemcached Documentation', [u'Brian Aker'], 3), ('libmemcached_configuration', 'memcached', u'libmemcached Documentation', [u'Brian Aker'], 3), - ('libmemcached_configuration', 'libmemcached_check_configuration', u'libmemcached Documentation', [u'Brian Aker'], 3), + ('libmemcached_examples', 'libmemcached_examples', u'libmemcached Documentation', [u'Brian Aker'], 3), ('libmemcachedutil', 'libmemcachedutil', u'libmemcached Documentation', [u'Brian Aker'], 3), ('memcached_analyze', 'memcached_analyze', u'libmemcached Documentation', [u'Brian Aker'], 3), + ('memcached_append', 'memcached_append', u'Appending to or Prepending to data on the server', [u'Brian Aker'], 3), + ('memcached_append', 'memcached_append_by_key', u'Appending to or Prepending to data on the server', [u'Brian Aker'], 3), + ('memcached_append', 'memcached_prepend', u'Appending to or Prepending to data on the server', [u'Brian Aker'], 3), + ('memcached_append', 'memcached_prepend_by_key', u'Appending to or Prepending to data on the server', [u'Brian Aker'], 3), ('memcached_auto', 'memcached_auto', u'Incrementing and Decrementing Values', [u'Brian Aker'], 3), ('memcached_auto', 'memcached_decrement', u'Incrementing and Decrementing Values', [u'Brian Aker'], 3), ('memcached_auto', 'memcached_decrement_with_initial', u'Incrementing and Decrementing Values', [u'Brian Aker'], 3), @@ -254,8 +258,8 @@ man_pages = [ ('memcached_dump', 'memcached_dump', u'libmemcached Documentation', [u'Brian Aker'], 3), ('memcached_flush', 'memcached_flush', u'libmemcached Documentation', [u'Brian Aker'], 3), ('memcached_flush_buffers', 'memcached_flush_buffers', u'libmemcached Documentation', [u'Brian Aker'], 3), - ('memcached_generate_hash_value', 'memcached_generate_hash_value', u'Generating hash values directly', [u'Brian Aker'], 3), ('memcached_generate_hash_value', 'memcached_generate_hash', u'Generating hash values directly', [u'Brian Aker'], 3), + ('memcached_generate_hash_value', 'memcached_generate_hash_value', u'Generating hash values directly', [u'Brian Aker'], 3), ('memcached_get', 'memcached_fetch', u'Retrieving data from the server', [u'Brian Aker'], 3), ('memcached_get', 'memcached_fetch_execute', u'Retrieving data from the server', [u'Brian Aker'], 3), ('memcached_get', 'memcached_fetch_result', u'Retrieving data from the server', [u'Brian Aker'], 3), @@ -270,14 +274,14 @@ man_pages = [ ('memcached_memory_allocators', 'memcached_set_memory_allocators', u'libmemcached Documentation', [u'Brian Aker'], 3), ('memcached_memory_allocators', 'memcached_set_memory_allocators_context', u'libmemcached Documentation', [u'Brian Aker'], 3), ('memcached_pool', 'memcached_pool', u'libmemcached Documentation', [u'Brian Aker'], 3), - ('memcached_pool', 'memcached_pool_st', u'libmemcached Documentation', [u'Brian Aker'], 3), ('memcached_pool', 'memcached_pool_behavior_get', u'libmemcached Documentation', [u'Brian Aker'], 3), ('memcached_pool', 'memcached_pool_behavior_set', u'libmemcached Documentation', [u'Brian Aker'], 3), ('memcached_pool', 'memcached_pool_create', u'libmemcached Documentation', [u'Brian Aker'], 3), ('memcached_pool', 'memcached_pool_destroy', u'libmemcached Documentation', [u'Brian Aker'], 3), - ('memcached_pool', 'memcached_pool_push', u'libmemcached Documentation', [u'Brian Aker'], 3), ('memcached_pool', 'memcached_pool_pop', u'libmemcached Documentation', [u'Brian Aker'], 3), ('memcached_pool', 'memcached_pool_push', u'libmemcached Documentation', [u'Brian Aker'], 3), + ('memcached_pool', 'memcached_pool_push', u'libmemcached Documentation', [u'Brian Aker'], 3), + ('memcached_pool', 'memcached_pool_st', u'libmemcached Documentation', [u'Brian Aker'], 3), ('memcached_quit', 'memcached_quit', u'libmemcached Documentation', [u'Brian Aker'], 3), ('memcached_result_st', 'memcached_result_cas', u'Working with result sets', [u'Brian Aker'], 3), ('memcached_result_st', 'memcached_result_create', u'Working with result sets', [u'Brian Aker'], 3), @@ -291,8 +295,8 @@ man_pages = [ ('memcached_sasl', 'memcached_destroy_sasl_auth_data', u'libmemcached Documentation', [u'Brian Aker'], 3), ('memcached_sasl', 'memcached_get_sasl_callbacks', u'libmemcached Documentation', [u'Brian Aker'], 3), ('memcached_sasl', 'memcached_sasl', u'libmemcached Documentation', [u'Brian Aker'], 3), - ('memcached_sasl', 'memcached_set_sasl_callbacks', u'libmemcached Documentation', [u'Brian Aker'], 3), ('memcached_sasl', 'memcached_sasl_set_auth_data', u'libmemcached Documentation', [u'Brian Aker'], 3), + ('memcached_sasl', 'memcached_set_sasl_callbacks', u'libmemcached Documentation', [u'Brian Aker'], 3), ('memcached_server_st', 'memcached_server_list_append', u'libmemcached Documentation', [u'Brian Aker'], 3), ('memcached_server_st', 'memcached_server_list_count', u'libmemcached Documentation', [u'Brian Aker'], 3), ('memcached_server_st', 'memcached_server_list_free', u'libmemcached Documentation', [u'Brian Aker'], 3), @@ -307,12 +311,8 @@ man_pages = [ ('memcached_servers', 'memcached_servers', u'libmemcached Documentation', [u'Brian Aker'], 3), ('memcached_set', 'memcached_add', u'Storing and Replacing Data', [u'Brian Aker'], 3), ('memcached_set', 'memcached_add_by_key', u'Storing and Replacing Data', [u'Brian Aker'], 3), - ('memcached_set', 'memcached_append', u'Storing and Replacing Data', [u'Brian Aker'], 3), - ('memcached_set', 'memcached_append_by_key', u'Storing and Replacing Data', [u'Brian Aker'], 3), - ('memcached_set', 'memcached_cas', u'Storing and Replacing Data', [u'Brian Aker'], 3), - ('memcached_set', 'memcached_cas_by_key', u'Storing and Replacing Data', [u'Brian Aker'], 3), - ('memcached_set', 'memcached_prepend', u'Storing and Replacing Data', [u'Brian Aker'], 3), - ('memcached_set', 'memcached_prepend_by_key', u'Storing and Replacing Data', [u'Brian Aker'], 3), + ('memcached_cas', 'memcached_cas', u'Working with data on the server in an atomic fashion', [u'Brian Aker'], 3), + ('memcached_cas', 'memcached_cas_by_key', u'Storing and Replacing Data', [u'Brian Aker'], 3), ('memcached_set', 'memcached_replace', u'Storing and Replacing Data', [u'Brian Aker'], 3), ('memcached_set', 'memcached_replace_by_key', u'Storing and Replacing Data', [u'Brian Aker'], 3), ('memcached_set', 'memcached_set', u'Storing and Replacing Data', [u'Brian Aker'], 3), diff --git a/docs/hashkit_create.rst b/docs/hashkit_create.rst index e0c9c71c..f7aabac5 100644 --- a/docs/hashkit_create.rst +++ b/docs/hashkit_create.rst @@ -2,14 +2,12 @@ Creating a hashkit structure ============================ +.. index:: object: hashkit_st -------- SYNOPSIS -------- -C Library for hashing algorithms (libmemcached, -lhashkit) - - #include .. c:function:: hashkit_st *hashkit_create(hashkit_st *hash); @@ -20,7 +18,7 @@ C Library for hashing algorithms (libmemcached, -lhashkit) .. c:function:: bool hashkit_is_allocated(const hashkit_st *hash); -Compile and link with -lmemcached +Compile and link with -lhashkit ----------- diff --git a/docs/hashkit_functions.rst b/docs/hashkit_functions.rst index 23049e08..9342a4d4 100644 --- a/docs/hashkit_functions.rst +++ b/docs/hashkit_functions.rst @@ -2,39 +2,38 @@ Available Hashes ================ +.. index:: object: hashkit_st Various hash functions to use for calculating values for keys -------- -LIBRARY -------- +-------- +SYNOPSIS +-------- +#include + +.. c:function:: uint32_t hashkit_default(const char *key, size_t key_length); -C Library for hashing algorithms (libmemcached, -lhashkit) +.. c:function:: uint32_t hashkit_fnv1_64(const char *key, size_t key_length); +.. c:function:: uint32_t hashkit_fnv1a_64(const char *key, size_t key_length); --------- -SYNOPSIS --------- +.. c:function:: uint32_t hashkit_fnv1_32(const char *key, size_t key_length); +.. c:function:: uint32_t hashkit_fnv1a_32(const char *key, size_t key_length); +.. c:function:: uint32_t hashkit_crc32(const char *key, size_t key_length); -.. code-block:: perl +.. c:function:: uint32_t hashkit_hsieh(const char *key, size_t key_length); - #include - - uint32_t hashkit_default(const char *key, size_t key_length); - uint32_t hashkit_fnv1_64(const char *key, size_t key_length); - uint32_t hashkit_fnv1a_64(const char *key, size_t key_length); - uint32_t hashkit_fnv1_32(const char *key, size_t key_length); - uint32_t hashkit_fnv1a_32(const char *key, size_t key_length); - uint32_t hashkit_crc32(const char *key, size_t key_length); - uint32_t hashkit_hsieh(const char *key, size_t key_length); - uint32_t hashkit_murmur(const char *key, size_t key_length); - uint32_t hashkit_jenkins(const char *key, size_t key_length); - uint32_t hashkit_md5(const char *key, size_t key_length); +.. c:function:: uint32_t hashkit_murmur(const char *key, size_t key_length); + +.. c:function:: uint32_t hashkit_jenkins(const char *key, size_t key_length); + +.. c:function:: uint32_t hashkit_md5(const char *key, size_t key_length); +Compile and link with -lhashkit ----------- diff --git a/docs/hashkit_value.rst b/docs/hashkit_value.rst index 8f9fc4db..f768f887 100644 --- a/docs/hashkit_value.rst +++ b/docs/hashkit_value.rst @@ -3,30 +3,21 @@ hashkit_value ============= -Generate a value for the given key - - -------- -LIBRARY -------- - - -C Library for hashing algorithms (libmemcached, -lhashkit) +.. index:: object: hashkit_st +Generate a value for the given key -------- SYNOPSIS -------- +#include -.. code-block:: perl - - #include +.. c:function:: uint32_t hashkit_value(hashkit_st *hash, const char *key, size_t key_length); - uint32_t hashkit_value(hashkit_st *hash, - const char *key, - size_t key_length); + +Compile and link with -lhashkit diff --git a/docs/include.am b/docs/include.am index 5cd682b7..b8b7a62b 100644 --- a/docs/include.am +++ b/docs/include.am @@ -63,9 +63,11 @@ EXTRA_DIST+= \ docs/libmemcachedutil.rst \ docs/memaslap.rst \ docs/memcached_analyze.rst \ + docs/memcached_append.rst \ docs/memcached_auto.rst \ docs/memcached_behavior.rst \ docs/memcached_callback.rst \ + docs/memcached_cas.rst \ docs/memcached_create.rst \ docs/memcached_delete.rst \ docs/memcached_dump.rst \ diff --git a/docs/index.rst b/docs/index.rst index d9d3e033..cef0830d 100644 --- a/docs/index.rst +++ b/docs/index.rst @@ -36,6 +36,8 @@ Working with data memcached_get memcached_result_st memcached_set + memcached_append + memcached_cas ############### diff --git a/docs/libhashkit.rst b/docs/libhashkit.rst index ffa661b7..5f31f69b 100644 --- a/docs/libhashkit.rst +++ b/docs/libhashkit.rst @@ -3,20 +3,7 @@ Introducing libhashkit ====================== -------- -LIBRARY -------- - - -C library collection of useful hashing algorithm (libhashkit, -lhashkit) - - --------- -SYNOPSIS --------- - - -.. code-block:: perl +.. code-block:: c cc [ flag ... ] file ... -lhashkit @@ -45,5 +32,5 @@ To find out more information please check: SEE ALSO -------- -:manpage:`libmemcached(3)` +:manpage:`libhashkit(3)` diff --git a/docs/libmemcached_configuration.rst b/docs/libmemcached_configuration.rst index abbdad0a..74902aab 100644 --- a/docs/libmemcached_configuration.rst +++ b/docs/libmemcached_configuration.rst @@ -2,14 +2,16 @@ Configuring Libmemcached ======================== +.. index:: object: memcached_st + -------- SYNOPSIS -------- +#include .. c:function:: memcached_st *memcached(const char *string, size_t string_length) - .. c:function:: memcached_return_t libmemcached_check_configuration(const char *option_string, size_t length, char *error_buffer, size_t error_buffer_size) Compile and link with -lmemcached diff --git a/docs/libmemcached_examples.rst b/docs/libmemcached_examples.rst index 5a115864..81137e86 100644 --- a/docs/libmemcached_examples.rst +++ b/docs/libmemcached_examples.rst @@ -19,7 +19,6 @@ Connecting to servers --------------------- - .. code-block:: c const char *config_string= "--SERVER=host10.example.com --SERVER=host11.example.com --SERVER=host10.example.com" diff --git a/docs/libmemcachedutil.rst b/docs/libmemcachedutil.rst index fd0e81ed..091d9011 100644 --- a/docs/libmemcachedutil.rst +++ b/docs/libmemcachedutil.rst @@ -6,20 +6,11 @@ Introducing Utility library for libmemcached -------- -LIBRARY -------- - - -C Client Library containing utility functions for libmemcached (libmemcachedutil, -lmemcachedutil -lmemcached) - - -------- SYNOPSIS -------- - -.. code-block:: perl +.. code-block:: c cc [ flag ... ] file ... -lmemcachedutil diff --git a/docs/memcached_analyze.rst b/docs/memcached_analyze.rst index 53cd8537..56fbf1f3 100644 --- a/docs/memcached_analyze.rst +++ b/docs/memcached_analyze.rst @@ -6,30 +6,18 @@ Anaylzing servers Analyze server information -------- -LIBRARY -------- - - -C Client Library for memcached (libmemcached, -lmemcached) - - -------- SYNOPSIS -------- +.. index:: object: memcached_analysis_st -.. code-block:: perl - - #include +#include - memcached_analysis_st * - memcached_analyze (memcached_st *ptr, - memcached_stat_st *stat, - memcached_return_t *error); - +.. c:function:: memcached_analysis_st * memcached_analyze (memcached_st *ptr, memcached_stat_st *stat, memcached_return_t *error); +Compile and link with -lmemcached ----------- DESCRIPTION diff --git a/docs/memcached_append.rst b/docs/memcached_append.rst new file mode 100644 index 00000000..20244c76 --- /dev/null +++ b/docs/memcached_append.rst @@ -0,0 +1,97 @@ +============================================= +Appending or Prepending to data on the server +============================================= + +.. index:: object: memcached_st + +Appending or Prepending to data on the server + + +-------- +SYNOPSIS +-------- + + +#include + +.. c:function:: memcached_return_t memcached_prepend(memcached_st *ptr, const char *key, size_t key_length, const char *value, size_t value_length, time_t expiration, uint32_t flags) + +.. c:function:: memcached_return_t memcached_append(memcached_st *ptr, const char *key, size_t key_length, const char *value, size_t value_length, time_t expiration, uint32_t flags) + +.. c:function:: memcached_return_t memcached_prepend_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); + +.. c:function:: memcached_return_t memcached_append_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); + +Compile and link with -lmemcached + + +----------- +DESCRIPTION +----------- + + +memcached_prepend() and memcached_append are used to +modify information on a server. All methods take a key, and its length to +store the object. Keys are currently limited to 250 characters when using either a version of memcached(1) which is 1.4 or below, or when using the text protocol. +You must supply both a value and a length. Optionally you +may test an expiration time for the object and a 16 byte value (it is +meant to be used as a bitmap). "flags" is a 4byte space that is stored alongside of the main value. Many sub libraries make use of this field, so in most cases users should avoid making use of it. + +memcached_prepend() places a segment of data before the last piece of data +stored. Currently expiration and key are not used in the server. + +memcached_append() places a segment of data at the end of the last piece of +data stored. Currently expiration and key are not used in the server. + +memcached_prepend_by_key() and memcached_append_by_key_by_key(, +methods both behave in a similar method as the non key +methods. The difference is that they use their group_key parameter to map +objects to particular servers. + +If you are looking for performance, memcached_set() with non-blocking IO is +the fastest way to store data on the server. + +All of the above functions are testsed 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 +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 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 operations, there are at least 1335 bytes available +to split among the key, key_prefix, and value; for cas ASCII operations there are +at least 1318 bytes available to split among the key, key_prefix and value. If the +total size of the command, including overhead, exceeds 1400 bytes, a \ ``MEMCACHED_WRITE_FAILURE``\ +will be returned. + + +------ +RETURN +------ + + +All methods return a value of type \ ``memcached_return_t``\ . +On success the value will be \ ``MEMCACHED_SUCCESS``\ . +Use memcached_strerror() to translate this value to a printable string. + + +---- +HOME +---- + + +To find out more information please check: +`http://libmemcached.org/ `_ + + +-------- +SEE ALSO +-------- + + +memcached(1) libmemached(3) memcached_strerror(3) memcached_set(3) memcached_add(3) memcached_cas(3) memcached_replace(3) + diff --git a/docs/memcached_auto.rst b/docs/memcached_auto.rst index 193e51ac..c008cd5d 100644 --- a/docs/memcached_auto.rst +++ b/docs/memcached_auto.rst @@ -2,14 +2,12 @@ Incrementing and Decrementing Values ==================================== - +.. index:: object: memcached_st -------- SYNOPSIS -------- - - #include .. c:function:: memcached_return_t memcached_increment (memcached_st *ptr, const char *key, size_t key_length, unsigned int offset, uint64_t *value); diff --git a/docs/memcached_behavior.rst b/docs/memcached_behavior.rst index 7100d9e5..0a8314d9 100644 --- a/docs/memcached_behavior.rst +++ b/docs/memcached_behavior.rst @@ -3,15 +3,9 @@ Modifying how the driver behaves ================================ -Manipulate behavior +Manipulate the behavior of a memcached_st structure. - -------- -LIBRARY -------- - - -C Client Library for memcached (libmemcached, -lmemcached) +.. index:: object: memcached_st -------- @@ -25,6 +19,7 @@ SYNOPSIS .. c:function:: memcached_return_t memcached_behavior_set (memcached_st *ptr, memcached_behavior flag, uint64_t data); +Compile and link with -lmemcached ----------- diff --git a/docs/memcached_callback.rst b/docs/memcached_callback.rst index aac70391..bec57f81 100644 --- a/docs/memcached_callback.rst +++ b/docs/memcached_callback.rst @@ -5,13 +5,7 @@ Setting callbacks Get and set a callback - -------- -LIBRARY -------- - - -C Client Library for memcached (libmemcached, -lmemcached) +.. index:: object: memcached_st -------- @@ -24,6 +18,7 @@ SYNOPSIS .. c:function:: void * memcached_callback_get (memcached_st *ptr, memcached_callback_t flag, memcached_return_t *error); +Compile and link with -lmemcached ----------- diff --git a/docs/memcached_cas.rst b/docs/memcached_cas.rst new file mode 100644 index 00000000..9d2188a6 --- /dev/null +++ b/docs/memcached_cas.rst @@ -0,0 +1,80 @@ +==================================================== +Working with data on the server in an atomic fashion +==================================================== + +.. index:: object: memcached_st + + +-------- +SYNOPSIS +-------- + + +#include + +.. c:function:: memcached_return_t 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); + +.. c:function:: memcached_return_t 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); + +Compile and link with -lmemcached + + +----------- +DESCRIPTION +----------- + +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(3) structure. At the point +that this note was written cas is still buggy in memached. Turning on tests +for it in libmemcached(3) is optional. Please see memcached_set() for +information on how to do this. + +memcached_cas_by_key() method behaves in a similar method as the non key +methods. The difference is that it uses the group_key parameter to map +objects to particular servers. + +memcached_cas() is testsed 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 +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 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 operations, there are at least 1335 bytes available +to split among the key, key_prefix, and value; for cas ASCII operations there are +at least 1318 bytes available to split among the key, key_prefix and value. If the +total size of the command, including overhead, exceeds 1400 bytes, a \ ``MEMCACHED_WRITE_FAILURE``\ +will be returned. + + +------ +RETURN +------ + + +All methods return a value of type \ ``memcached_return_t``\ . +On success the value will be \ ``MEMCACHED_SUCCESS``\ . +Use memcached_strerror() to translate this value to a printable string. + + +---- +HOME +---- + + +To find out more information please check: +`http://libmemcached.org/ `_ + + +-------- +SEE ALSO +-------- + + +memcached(1) libmemached(3) memcached_strerror(3) memcached_set(3) memcached_append(3) memcached_add(3) memcached_prepend(3) memcached_replace(3) + diff --git a/docs/memcached_create.rst b/docs/memcached_create.rst index 1409af29..12bf92c5 100644 --- a/docs/memcached_create.rst +++ b/docs/memcached_create.rst @@ -2,9 +2,6 @@ Creating and destroying a memcached_st ====================================== - -Create a memcached_st structure - .. index:: object: memcached_st -------- diff --git a/docs/memcached_delete.rst b/docs/memcached_delete.rst index f628f69e..5c373b08 100644 --- a/docs/memcached_delete.rst +++ b/docs/memcached_delete.rst @@ -2,6 +2,8 @@ Deleting data from a server =========================== +.. index:: object: memcached_st + -------- SYNOPSIS -------- diff --git a/docs/memcached_dump.rst b/docs/memcached_dump.rst index a7dcb4fe..08c21c46 100644 --- a/docs/memcached_dump.rst +++ b/docs/memcached_dump.rst @@ -5,13 +5,7 @@ Dumping data from a server Get a list of keys found on memcached servers - -------- -LIBRARY -------- - - -C Client Library for memcached (libmemcached, -lmemcached) +.. index:: object: memcached_st -------- @@ -19,21 +13,13 @@ SYNOPSIS -------- +#include -.. code-block:: perl - - #include - - memcached_return_t - memcached_dump (memcached_st *ptr, - memcached_dump_fn *function, - void *context, - uint32_t number_of_callbacks); +.. c:function:: memcached_return_t memcached_dump (memcached_st *ptr, memcached_dump_fn *function, void *context, uint32_t number_of_callbacks); - typedef memcached_return_t (*memcached_dump_fn)(memcached_st *ptr, - const char *key, - size_t key_length, - void *context); +.. c:function:: typedef memcached_return_t (*memcached_dump_fn)(memcached_st *ptr, const char *key, size_t key_length, void *context); + +Compile and link with -lmemcached diff --git a/docs/memcached_flush.rst b/docs/memcached_flush.rst index cdd549cc..c38ad499 100644 --- a/docs/memcached_flush.rst +++ b/docs/memcached_flush.rst @@ -2,6 +2,7 @@ Wiping clean the contents of a server ===================================== +.. index:: object: memcached_st Wipe contents of memcached servers diff --git a/docs/memcached_flush_buffers.rst b/docs/memcached_flush_buffers.rst index c09165e8..5419c900 100644 --- a/docs/memcached_flush_buffers.rst +++ b/docs/memcached_flush_buffers.rst @@ -3,16 +3,9 @@ Flushing client buffers ======================= -Flush buffers and send buffered commands - - -------- -LIBRARY -------- - - -C Client Library for memcached (libmemcached, -lmemcached) +.. index:: object: memcached_st +Flush and senf buffered commands -------- SYNOPSIS @@ -22,6 +15,7 @@ SYNOPSIS .. c:function:: memcached_return_t memcached_flush_buffers (memcached_st *ptr); +Compile and link with -lmemcached ----------- diff --git a/docs/memcached_generate_hash_value.rst b/docs/memcached_generate_hash_value.rst index b6f401e4..4bfe2f07 100644 --- a/docs/memcached_generate_hash_value.rst +++ b/docs/memcached_generate_hash_value.rst @@ -2,6 +2,7 @@ Generating hash values directly =============================== +.. index:: object: memcached_st Hash a key value diff --git a/docs/memcached_get.rst b/docs/memcached_get.rst index dcb931c7..c563f396 100644 --- a/docs/memcached_get.rst +++ b/docs/memcached_get.rst @@ -2,6 +2,7 @@ Retrieving data from the server =============================== +.. index:: object: memcached_st -------- SYNOPSIS diff --git a/docs/memcached_memory_allocators.rst b/docs/memcached_memory_allocators.rst index 40219079..33f3d3a7 100644 --- a/docs/memcached_memory_allocators.rst +++ b/docs/memcached_memory_allocators.rst @@ -2,41 +2,32 @@ Use custom allocators for embedded usage ======================================== +.. index:: object: memcached_st Manage memory allocator functions +-------- +SYNOPSIS +-------- -------- -LIBRARY -------- +#include -C Client Library for memcached (libmemcached, -lmemcached) +.. c:function:: memcached_return_t memcached_set_memory_allocators (memcached_st *ptr, memcached_malloc_fn mem_malloc, memcached_free_fn mem_free, memcached_realloc_fn mem_realloc, memcached_calloc_fn mem_calloc, void *context); +.. c:function:: void memcached_get_memory_allocators (memcached_st *ptr, memcached_malloc_fn *mem_malloc, memcached_free_fn *mem_free, memcached_realloc_fn *mem_realloc, memcached_calloc_fn *mem_calloc); --------- -SYNOPSIS --------- +.. c:function:: void * memcached_get_memory_allocators_context(const memcached_st *ptr); + +.. c:function:: void * (*memcached_malloc_fn) (memcached_st *ptr, const size_t size, void *context); + +.. c:function:: void * (*memcached_realloc_fn) (memcached_st *ptr, void *mem, const size_t size, void *context); +.. c:function:: void (*memcached_free_fn) (memcached_st *ptr, void *mem, void *context); +.. c:function:: void * (*memcached_calloc_fn) (memcached_st *ptr, size_t nelem, const size_t elsize, void *context); -.. code-block:: perl - - #include - - memcached_return_t memcached_set_memory_allocators (memcached_st *ptr, memcached_malloc_fn mem_malloc, memcached_free_fn mem_free, memcached_realloc_fn mem_realloc, memcached_calloc_fn mem_calloc, void *context); - - void memcached_get_memory_allocators (memcached_st *ptr, memcached_malloc_fn *mem_malloc, memcached_free_fn *mem_free, memcached_realloc_fn *mem_realloc, memcached_calloc_fn *mem_calloc); - - void * memcached_get_memory_allocators_context(const memcached_st *ptr); - - void * (*memcached_malloc_fn) (memcached_st *ptr, const size_t size, void *context); - - void * (*memcached_realloc_fn) (memcached_st *ptr, void *mem, const size_t size, void *context); - - void (*memcached_free_fn) (memcached_st *ptr, void *mem, void *context); - - void * (*memcached_calloc_fn) (memcached_st *ptr, size_t nelem, const size_t elsize, void *context); +Compile and link with -lmemcached diff --git a/docs/memcached_quit.rst b/docs/memcached_quit.rst index fb137f72..06e98e8f 100644 --- a/docs/memcached_quit.rst +++ b/docs/memcached_quit.rst @@ -2,6 +2,7 @@ Disconnecting a client from a server ==================================== +.. index:: object: memcached_st -------- SYNOPSIS diff --git a/docs/memcached_result_st.rst b/docs/memcached_result_st.rst index e8aba518..fab6c4a4 100644 --- a/docs/memcached_result_st.rst +++ b/docs/memcached_result_st.rst @@ -2,53 +2,40 @@ Working with result sets ======================== +.. index:: object: memcached_result_st Work with memcached_result_st -------- -LIBRARY -------- +-------- +SYNOPSIS +-------- +#include -C Client Library for memcached (libmemcached, -lmemcached) +.. c:function:: memcached_result_st * memcached_result_create (memcached_st *ptr, memcached_result_st *result); +.. c:function:: void memcached_result_free (memcached_result_st *result); --------- -SYNOPSIS --------- +.. c:function:: const char * memcached_result_key_value (memcached_result_st *result); + +.. c:function:: size_t memcached_result_key_length (const memcached_result_st *result); + +.. c:function:: const char *memcached_result_value (memcached_result_st *ptr); + +.. c:function:: size_t memcached_result_length (const memcached_result_st *ptr); + +.. c:function:: uint32_t memcached_result_flags (const memcached_result_st *result) + +.. c:function:: uint64_t memcached_result_cas (const memcached_result_st *result); + +.. c:function:: memcached_return_t memcached_result_set_value (memcached_result_st *ptr, const char *value, size_t length) +.. c:function:: void memcached_result_set_flags (memcached_result_st *ptr, uint32_t flags) +.. c:function:: void memcached_result_set_expiration (memcached_result_st *ptr, time_t) -.. code-block:: perl - - #include - - memcached_result_st * - memcached_result_create (memcached_st *ptr, - memcached_result_st *result); - - void memcached_result_free (memcached_result_st *result); - - const char * memcached_result_key_value (memcached_result_st *result); - - size_t memcached_result_key_length (const memcached_result_st *result); - - const char *memcached_result_value (memcached_result_st *ptr); - - size_t memcached_result_length (const memcached_result_st *ptr); - - uint32_t memcached_result_flags (const memcached_result_st *result) - - uint64_t memcached_result_cas (const memcached_result_st *result); - - memcached_return_t - memcached_result_set_value (memcached_result_st *ptr, - const char *value, size_t length) - - void memcached_result_set_flags (memcached_result_st *ptr, uint32_t flags) - - void memcached_result_set_expiration (memcached_result_st *ptr, time_t) +Compile and link with -lmemcachedutil -lmemcached diff --git a/docs/memcached_sasl.rst b/docs/memcached_sasl.rst index bf0251dd..4dc4039c 100644 --- a/docs/memcached_sasl.rst +++ b/docs/memcached_sasl.rst @@ -2,34 +2,24 @@ SASL support ============ - -------- -LIBRARY -------- - - -C Client Library for memcached (libmemcached, -lmemcached) +.. index:: object: memcached_st -------- SYNOPSIS -------- +#include + +.. c:function:: void memcached_set_sasl_callbacks(memcached_st *ptr, const sasl_callback_t *callbacks) + +.. c:function:: const sasl_callback_t *memcached_get_sasl_callbacks(memcached_st *ptr) +.. c:function:: memcached_return memcached_set_sasl_auth_data(memcached_st *ptr, const char *username, const char *password) -.. code-block:: perl +.. c:function:: memcached_return memcached_destroy_sasl_auth_data(memcached_st *ptr) - #include - - void memcached_set_sasl_callbacks(memcached_st *ptr, - const sasl_callback_t *callbacks) - - const sasl_callback_t *memcached_get_sasl_callbacks(memcached_st *ptr) - - memcached_return memcached_set_sasl_auth_data(memcached_st *ptr, - const char *username, - const char *password) - memcached_return memcached_destroy_sasl_auth_data(memcached_st *ptr) +Compile and link with -lmemcached diff --git a/docs/memcached_server_st.rst b/docs/memcached_server_st.rst index 700ca51b..77eb9137 100644 --- a/docs/memcached_server_st.rst +++ b/docs/memcached_server_st.rst @@ -3,6 +3,7 @@ Managing lists of servers ========================= +.. index:: object: memcached_server_instance_st -------- SYNOPSIS diff --git a/docs/memcached_servers.rst b/docs/memcached_servers.rst index 6c03ea03..5156b2a2 100644 --- a/docs/memcached_servers.rst +++ b/docs/memcached_servers.rst @@ -2,43 +2,31 @@ Manipulate the server information stored in memcached_st ======================================================== +.. index:: object: memcached_st -Manage server list - - -******* -LIBRARY -******* +-------- +SYNOPSIS +-------- +#include + +.. c:function:: uint32_t memcached_server_count (memcached_st *ptr); -C Client Library for memcached (libmemcached, -lmemcached) +.. c:function:: memcached_return_t memcached_server_add (memcached_st *ptr, const char *hostname, in_port_t port); +.. c:function:: memcached_return_t memcached_server_add_udp (memcached_st *ptr, const char *hostname, in_port_t port); --------- -SYNOPSIS --------- +.. c:function:: memcached_return_t memcached_server_add_unix_socket (memcached_st *ptr, const char *socket); +.. c:function:: memcached_return_t memcached_server_push (memcached_st *ptr, const memcached_server_st *list); +.. c:function:: memcached_server_instance_st memcached_server_by_key (const memcached_st *ptr, const char *key, size_t key_length, memcached_return_t *error); -.. code-block:: perl +.. c:function:: memcached_server_instance_st memcached_server_get_last_disconnect (const memcached_st *ptr) - #include - - uint32_t memcached_server_count (memcached_st *ptr); - - memcached_return_t memcached_server_add (memcached_st *ptr, const char *hostname, in_port_t port); - - memcached_return_t memcached_server_add_udp (memcached_st *ptr, const char *hostname, in_port_t port); - - memcached_return_t memcached_server_add_unix_socket (memcached_st *ptr, const char *socket); - - memcached_return_t memcached_server_push (memcached_st *ptr, const memcached_server_st *list); +.. c:function:: memcached_return_t memcached_server_cursor(const memcached_st *ptr, const memcached_server_fn *callback, void *context, uint32_t number_of_callbacks); - memcached_server_instance_st memcached_server_by_key (const memcached_st *ptr, const char *key, size_t key_length, memcached_return_t *error); - - memcached_server_instance_st memcached_server_get_last_disconnect (const memcached_st *ptr) - - memcached_return_t memcached_server_cursor(const memcached_st *ptr, const memcached_server_fn *callback, void *context, uint32_t number_of_callbacks); +compile and link with -lmemcached @@ -97,17 +85,17 @@ return from any callback will terminate the loop. memcached_server_cursor() is passed the original caller memcached_st in its current state. -****** +------ RETURN -****** +------ Varies, see particular functions. -**** +---- HOME -**** +---- To find out more information please check: diff --git a/docs/memcached_set.rst b/docs/memcached_set.rst index 4cdbd994..db668b22 100644 --- a/docs/memcached_set.rst +++ b/docs/memcached_set.rst @@ -1,9 +1,8 @@ -========================== -Storing and Replacing Data -========================== +========================================================= +Store, replace, add, or atomically add data to the server +========================================================= - -Store value on server +.. index:: object: memcached_st -------- @@ -11,7 +10,6 @@ SYNOPSIS -------- - #include .. c:function:: memcached_return_t memcached_set (memcached_st *ptr, const char *key, size_t key_length, const char *value, size_t value_length, time_t expiration, uint32_t flags); @@ -20,24 +18,12 @@ SYNOPSIS .. c:function:: memcached_return_t memcached_replace (memcached_st *ptr, const char *key, size_t key_length, const char *value, size_t value_length, time_t expiration, uint32_t flags); -.. c:function:: memcached_return_t memcached_prepend(memcached_st *ptr, const char *key, size_t key_length, const char *value, size_t value_length, time_t expiration, uint32_t flags) - -.. c:function:: memcached_return_t memcached_append(memcached_st *ptr, const char *key, size_t key_length, const char *value, size_t value_length, time_t expiration, uint32_t flags) - -.. c:function:: memcached_return_t 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); - .. c:function:: memcached_return_t memcached_set_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); .. c:function:: memcached_return_t memcached_add_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); .. c:function:: memcached_return_t memcached_replace_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); -.. c:function:: memcached_return_t memcached_prepend_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); - -.. c:function:: memcached_return_t memcached_append_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); - -.. c:function:: memcached_return_t 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); - Compile and link with -lmemcached @@ -48,10 +34,10 @@ DESCRIPTION memcached_set(), memcached_add(), and memcached_replace() are all used to store information on the server. All methods take a key, and its length to -store the object. Keys are currently limited to 250 characters by the -memcached(1) server. You must supply both a value and a length. Optionally you +store the object. Keys are currently limited to 250 characters when using either a version of memcached(1) which is 1.4 or below, or when using the text protocol. +You must supply both a value and a length. Optionally you may test an expiration time for the object and a 16 byte value (it is -meant to be used as a bitmap). +meant to be used as a bitmap). "flags" is a 4byte space that is stored alongside of the main value. Many sub libraries make use of this field, so in most cases users should avoid making use of it. memcached_set() will write an object to the server. If an object already exists it will overwrite what is in the server. If the object does not exist @@ -64,12 +50,6 @@ found on the server an error occurs. memcached_add() adds an object to the server. If the object is found on the server an error occurs, otherwise the value is stored. -memcached_prepend() places a segment of data before the last piece of data -stored. Currently expiration and key are not used in the server. - -memcached_append() places a segment of data at the end of the last piece of -data stored. Currently expiration and key are not used in the server. - 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(3) structure. At the point @@ -77,9 +57,8 @@ that this note was written cas is still buggy in memached. Turning on tests for it in libmemcached(3) is optional. Please see memcached_set() for information on how to do this. -memcached_set_by_key(), memcached_add_by_key(), memcached_replace_by_key(), -memcached_prepend_by_key(), memcached_append_by_key_by_key(), -memcached_cas_by_key() methods all behave in a similar method as the non key +memcached_set_by_key(), memcached_add_by_key(), and memcached_replace_by_key() +methods all behave in a similar method as the non key methods. The difference is that they use their group_key parameter to map objects to particular servers. @@ -131,5 +110,5 @@ SEE ALSO -------- -memcached(1) libmemached(3) memcached_strerror(3) +memcached(1) libmemached(3) memcached_strerror(3) memcached_prepend(3) memcached_cas(3) memcached_append(3) diff --git a/docs/memcached_stats.rst b/docs/memcached_stats.rst index a64aa14c..0c0115c9 100644 --- a/docs/memcached_stats.rst +++ b/docs/memcached_stats.rst @@ -5,52 +5,26 @@ Working with statistical information from a server Get memcached statistics - -******* -LIBRARY -******* - - -C Client Library for memcached (libmemcached, -lmemcached) +.. index:: object: memcached_st -------- SYNOPSIS -------- +#include + +.. c:function:: memcached_stat_st *memcached_stat (memcached_st *ptr, char *args, memcached_return_t *error); + +.. c:function:: memcached_return_t memcached_stat_servername (memcached_stat_st *stat, char *args, const char *hostname, unsigned int port); +.. c:function:: char * memcached_stat_get_value (memcached_st *ptr, memcached_stat_st *stat, const char *key, memcached_return_t *error); -.. code-block:: perl - - #include - - memcached_stat_st *memcached_stat (memcached_st *ptr, - char *args, - memcached_return_t *error); - - memcached_return_t memcached_stat_servername (memcached_stat_st *stat, - char *args, - const char *hostname, - unsigned int port); - - char * - memcached_stat_get_value (memcached_st *ptr, - memcached_stat_st *stat, - const char *key, - memcached_return_t *error); - - char ** - memcached_stat_get_keys (memcached_st *ptr, - memcached_stat_st *stat, - memcached_return_t *error); - - memcached_return_t - memcached_stat_execute (memcached_st *memc, - const char *args, - memcached_stat_fn func, - void *context); +.. c:function:: char ** memcached_stat_get_keys (memcached_st *ptr, memcached_stat_st *stat, memcached_return_t *error); +.. c:function:: memcached_return_t memcached_stat_execute (memcached_st *memc, const char *args, memcached_stat_fn func, void *context); +Compile and link with -lmemcached ----------- DESCRIPTION @@ -92,9 +66,9 @@ A command line tool, memstat(1), is provided so that you do not have to write an application to do this. -****** +------ RETURN -****** +------ Varies, see particular functions. @@ -103,18 +77,18 @@ Any method returning a \ ``memcached_stat_st``\ expects you to free the memory allocated for it. -**** +---- HOME -**** +---- To find out more information please check: `http://libmemcached.org/ `_ -****** +------ AUTHOR -****** +------ Brian Aker, diff --git a/docs/memcached_strerror.rst b/docs/memcached_strerror.rst index 6a22bd9b..ce5b1fa0 100644 --- a/docs/memcached_strerror.rst +++ b/docs/memcached_strerror.rst @@ -3,28 +3,17 @@ Coverting Errors, memcached_return_t, to strings ================================================ -******* -LIBRARY -******* - - -C Client Library for memcached (libmemcached, -lmemcached) - +.. index:: object: memcached_st -------- SYNOPSIS -------- +#include +.. c:function:: const char * memcached_strerror (memcached_st *ptr, memcached_return_t rc); -.. code-block:: perl - - #include - - const char * - memcached_strerror (memcached_st *ptr, - memcached_return_t rc); - +Compile and link with -lmemcached ----------- @@ -43,30 +32,23 @@ This string must not be modified by the application. with switch/case and know that you are capturing all possible return values. -****** +------ RETURN -****** +------ memcached_strerror() returns a string describing a \ ``memcached_return_t``\ value. -**** +---- HOME -**** +---- To find out more information please check: `http://libmemcached.org/ `_ -****** -AUTHOR -****** - - -Brian Aker, - -------- SEE ALSO diff --git a/docs/memcached_user_data.rst b/docs/memcached_user_data.rst index 5765ad91..107d0475 100644 --- a/docs/memcached_user_data.rst +++ b/docs/memcached_user_data.rst @@ -2,13 +2,14 @@ Storing custom user information in the client. ============================================== +.. index:: object: memcached_st Manage user specific data -******* +------- LIBRARY -******* +------- C Client Library for memcached (libmemcached, -lmemcached) @@ -45,9 +46,9 @@ memcached_get_user_data() is used to retrieve the user specific data in the memcached_st structure. -****** +------ RETURN -****** +------ memcached_set_user_data() returns the previous value of the user specific @@ -57,23 +58,15 @@ memcached_get_user_data() returns the current value uf the user specific data. -**** +---- HOME -**** +---- To find out more information please check: `http://libmemcached.org/ `_ -****** -AUTHOR -****** - - -Trond Norbye, - - -------- SEE ALSO -------- diff --git a/docs/memcached_verbosity.rst b/docs/memcached_verbosity.rst index 5378549d..e90febb4 100644 --- a/docs/memcached_verbosity.rst +++ b/docs/memcached_verbosity.rst @@ -2,32 +2,19 @@ Setting the verbosity of a server ================================= +.. index:: object: memcached_st Modifiy verbosity of servers - -******* -LIBRARY -******* - - -C Client Library for memcached (libmemcached, -lmemcached) - - -------- SYNOPSIS -------- +#include +.. c:function:: memcached_return_t memcached_verbosity (memcached_st *ptr, unsigned int verbosity); -.. code-block:: perl - - #include - - memcached_return_t - memcached_verbosity (memcached_st *ptr, - unsigned int verbosity); - +Compile and link with -lmemcached ----------- @@ -39,9 +26,9 @@ memcached_verbosity() modifies the "verbosity" of the memcached(1) servers referenced in the \ ``memcached_st``\ parameter. -****** +------ RETURN -****** +------ A value of type \ ``memcached_return_t``\ is returned @@ -49,23 +36,15 @@ On success that value will be \ ``MEMCACHED_SUCCESS``\ . Use memcached_strerror() to translate this value to a printable string. -**** +---- HOME -**** +---- To find out more information please check: `http://libmemcached.org/ `_ -****** -AUTHOR -****** - - -Brian Aker, - - -------- SEE ALSO -------- diff --git a/docs/memcached_version.rst b/docs/memcached_version.rst index a670c78f..ae983f4c 100644 --- a/docs/memcached_version.rst +++ b/docs/memcached_version.rst @@ -2,34 +2,19 @@ Getting version information about the client and server ======================================================= - -Get library version - - -******* -LIBRARY -******* - - -C Client Library for memcached (libmemcached, -lmemcached) - - + -------- SYNOPSIS -------- +#include +.. c:function:: const char * memcached_lib_version (void) -.. code-block:: perl +.. c:function:: memcached_return_t memcached_version (memcached_st *ptr) - #include - - const char * - memcached_lib_version (void) - - - memcached_return_t - memcached_version (memcached_st *ptr) + +Compile and link with -lmemcached @@ -46,9 +31,9 @@ memcached server being used by the memcached_st connection structure. It returns memcached server return code. -****** +------ RETURN -****** +------ A string with the version of libmemcached driver is returned from @@ -61,23 +46,15 @@ will be returned. Use memcached_strerror() to translate this value to a printable string. -**** +---- HOME -**** +---- To find out more information please check: `http://libmemcached.org/ `_ -****** -AUTHOR -****** - - -Brian Aker, - - -------- SEE ALSO -------- diff --git a/docs/memcapable.rst b/docs/memcapable.rst index b9d2f5a8..63e87845 100644 --- a/docs/memcapable.rst +++ b/docs/memcapable.rst @@ -2,6 +2,7 @@ memcapable - Checking a Memcached server capibilities and compatibility ======================================================================= +.. index:: object: memcached_st Check the server for compatibility and capabilities diff --git a/docs/memerror.rst b/docs/memerror.rst index 7501c071..16ee6147 100644 --- a/docs/memerror.rst +++ b/docs/memerror.rst @@ -27,23 +27,15 @@ readable string. For a full list of operations run the tool with the \ **--help**\ option. -**** +---- HOME -**** +---- To find out more infoerroration please check: `http://libmemcached.org/ `_ -****** -AUTHOR -****** - - -Brian Aker, - - -------- SEE ALSO -------- -- 2.30.2