('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),
('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),
('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),
('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),
('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),
Creating a hashkit structure
============================
+.. index:: object: hashkit_st
--------
SYNOPSIS
--------
-C Library for hashing algorithms (libmemcached, -lhashkit)
-
-
#include <libhashkit/hashkit.h>
.. c:function:: hashkit_st *hashkit_create(hashkit_st *hash);
.. c:function:: bool hashkit_is_allocated(const hashkit_st *hash);
-Compile and link with -lmemcached
+Compile and link with -lhashkit
-----------
Available Hashes
================
+.. index:: object: hashkit_st
Various hash functions to use for calculating values for keys
--------
-LIBRARY
--------
+--------
+SYNOPSIS
+--------
+#include <libhashkit/hashkit.h>
+
+.. 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 <libmemcached/hashkit.h>
-
- 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
-----------
=============
-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 <libhashkit/hashkit.h>
-.. code-block:: perl
-
- #include <libmemcached/hashkit.h>
+.. 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
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 \
memcached_get
memcached_result_st
memcached_set
+ memcached_append
+ memcached_cas
###############
======================
--------
-LIBRARY
--------
-
-
-C library collection of useful hashing algorithm (libhashkit, -lhashkit)
-
-
---------
-SYNOPSIS
---------
-
-
-.. code-block:: perl
+.. code-block:: c
cc [ flag ... ] file ... -lhashkit
SEE ALSO
--------
-:manpage:`libmemcached(3)`
+:manpage:`libhashkit(3)`
Configuring Libmemcached
========================
+.. index:: object: memcached_st
+
--------
SYNOPSIS
--------
+#include <libmemcached/memcached.h>
.. 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
---------------------
-
.. code-block:: c
const char *config_string= "--SERVER=host10.example.com --SERVER=host11.example.com --SERVER=host10.example.com"
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
Analyze server information
--------
-LIBRARY
--------
-
-
-C Client Library for memcached (libmemcached, -lmemcached)
-
-
--------
SYNOPSIS
--------
+.. index:: object: memcached_analysis_st
-.. code-block:: perl
-
- #include <libmemcached/memcached.h>
+#include <libmemcached/memcached.h>
- 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
--- /dev/null
+=============================================
+Appending or Prepending to data on the server
+=============================================
+
+.. index:: object: memcached_st
+
+Appending or Prepending to data on the server
+
+
+--------
+SYNOPSIS
+--------
+
+
+#include <libmemcached/memcached.h>
+
+.. 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/ <http://libmemcached.org/>`_
+
+
+--------
+SEE ALSO
+--------
+
+
+memcached(1) libmemached(3) memcached_strerror(3) memcached_set(3) memcached_add(3) memcached_cas(3) memcached_replace(3)
+
Incrementing and Decrementing Values
====================================
-
+.. index:: object: memcached_st
--------
SYNOPSIS
--------
-
-
#include <libmemcached/memcached.h>
.. c:function:: memcached_return_t memcached_increment (memcached_st *ptr, const char *key, size_t key_length, unsigned int offset, uint64_t *value);
================================
-Manipulate behavior
+Manipulate the behavior of a memcached_st structure.
-
--------
-LIBRARY
--------
-
-
-C Client Library for memcached (libmemcached, -lmemcached)
+.. index:: object: memcached_st
--------
.. c:function:: memcached_return_t memcached_behavior_set (memcached_st *ptr, memcached_behavior flag, uint64_t data);
+Compile and link with -lmemcached
-----------
Get and set a callback
-
--------
-LIBRARY
--------
-
-
-C Client Library for memcached (libmemcached, -lmemcached)
+.. index:: object: memcached_st
--------
.. c:function:: void * memcached_callback_get (memcached_st *ptr, memcached_callback_t flag, memcached_return_t *error);
+Compile and link with -lmemcached
-----------
--- /dev/null
+====================================================
+Working with data on the server in an atomic fashion
+====================================================
+
+.. index:: object: memcached_st
+
+
+--------
+SYNOPSIS
+--------
+
+
+#include <libmemcached/memcached.h>
+
+.. 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/ <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)
+
Creating and destroying a memcached_st
======================================
-
-Create a memcached_st structure
-
.. index:: object: memcached_st
--------
Deleting data from a server
===========================
+.. index:: object: memcached_st
+
--------
SYNOPSIS
--------
Get a list of keys found on memcached servers
-
--------
-LIBRARY
--------
-
-
-C Client Library for memcached (libmemcached, -lmemcached)
+.. index:: object: memcached_st
--------
--------
+#include <libmemcached/memcached.h>
-.. code-block:: perl
-
- #include <libmemcached/memcached.h>
-
- 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
Wiping clean the contents of a server
=====================================
+.. index:: object: memcached_st
Wipe contents of memcached servers
=======================
-Flush buffers and send buffered commands
-
-
--------
-LIBRARY
--------
-
-
-C Client Library for memcached (libmemcached, -lmemcached)
+.. index:: object: memcached_st
+Flush and senf buffered commands
--------
SYNOPSIS
.. c:function:: memcached_return_t memcached_flush_buffers (memcached_st *ptr);
+Compile and link with -lmemcached
-----------
Generating hash values directly
===============================
+.. index:: object: memcached_st
Hash a key value
Retrieving data from the server
===============================
+.. index:: object: memcached_st
--------
SYNOPSIS
Use custom allocators for embedded usage
========================================
+.. index:: object: memcached_st
Manage memory allocator functions
+--------
+SYNOPSIS
+--------
--------
-LIBRARY
--------
+#include <libmemcached/memcached.h>
-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 <libmemcached/memcached.h>
-
- 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
Disconnecting a client from a server
====================================
+.. index:: object: memcached_st
--------
SYNOPSIS
Working with result sets
========================
+.. index:: object: memcached_result_st
Work with memcached_result_st
--------
-LIBRARY
--------
+--------
+SYNOPSIS
+--------
+#include <libmemcached/memcached_pool.h>
-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 <libmemcached/memcached.h>
-
- 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
SASL support
============
-
--------
-LIBRARY
--------
-
-
-C Client Library for memcached (libmemcached, -lmemcached)
+.. index:: object: memcached_st
--------
SYNOPSIS
--------
+#include <libmemcached/memcached_pool.h>
+
+.. 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 <libmemcached/memcached.h>
-
- 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
=========================
+.. index:: object: memcached_server_instance_st
--------
SYNOPSIS
Manipulate the server information stored in memcached_st
========================================================
+.. index:: object: memcached_st
-Manage server list
-
-
-*******
-LIBRARY
-*******
+--------
+SYNOPSIS
+--------
+#include <libmemcached/memcached.h>
+
+.. 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 <libmemcached/memcached.h>
-
- 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
is passed the original caller memcached_st in its current state.
-******
+------
RETURN
-******
+------
Varies, see particular functions.
-****
+----
HOME
-****
+----
To find out more information please check:
-==========================
-Storing and Replacing Data
-==========================
+=========================================================
+Store, replace, add, or atomically add data to the server
+=========================================================
-
-Store value on server
+.. index:: object: memcached_st
--------
--------
-
#include <libmemcached/memcached.h>
.. 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);
.. 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
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
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
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.
--------
-memcached(1) libmemached(3) memcached_strerror(3)
+memcached(1) libmemached(3) memcached_strerror(3) memcached_prepend(3) memcached_cas(3) memcached_append(3)
Get memcached statistics
-
-*******
-LIBRARY
-*******
-
-
-C Client Library for memcached (libmemcached, -lmemcached)
+.. index:: object: memcached_st
--------
SYNOPSIS
--------
+#include <libmemcached/memcached.h>
+
+.. 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 <libmemcached/memcached.h>
-
- 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
an application to do this.
-******
+------
RETURN
-******
+------
Varies, see particular functions.
memory allocated for it.
-****
+----
HOME
-****
+----
To find out more information please check:
`http://libmemcached.org/ <http://libmemcached.org/>`_
-******
+------
AUTHOR
-******
+------
Brian Aker, <brian@tangent.org>
================================================
-*******
-LIBRARY
-*******
-
-
-C Client Library for memcached (libmemcached, -lmemcached)
-
+.. index:: object: memcached_st
--------
SYNOPSIS
--------
+#include <libmemcached/memcached.h>
+.. c:function:: const char * memcached_strerror (memcached_st *ptr, memcached_return_t rc);
-.. code-block:: perl
-
- #include <libmemcached/memcached.h>
-
- const char *
- memcached_strerror (memcached_st *ptr,
- memcached_return_t rc);
-
+Compile and link with -lmemcached
-----------
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/ <http://libmemcached.org/>`_
-******
-AUTHOR
-******
-
-
-Brian Aker, <brian@tangent.org>
-
--------
SEE ALSO
Storing custom user information in the client.
==============================================
+.. index:: object: memcached_st
Manage user specific data
-*******
+-------
LIBRARY
-*******
+-------
C Client Library for memcached (libmemcached, -lmemcached)
the memcached_st structure.
-******
+------
RETURN
-******
+------
memcached_set_user_data() returns the previous value of the user specific
data.
-****
+----
HOME
-****
+----
To find out more information please check:
`http://libmemcached.org/ <http://libmemcached.org/>`_
-******
-AUTHOR
-******
-
-
-Trond Norbye, <trond.norbye@gmail.com>
-
-
--------
SEE ALSO
--------
Setting the verbosity of a server
=================================
+.. index:: object: memcached_st
Modifiy verbosity of servers
-
-*******
-LIBRARY
-*******
-
-
-C Client Library for memcached (libmemcached, -lmemcached)
-
-
--------
SYNOPSIS
--------
+#include <libmemcached/memcached.h>
+.. c:function:: memcached_return_t memcached_verbosity (memcached_st *ptr, unsigned int verbosity);
-.. code-block:: perl
-
- #include <libmemcached/memcached.h>
-
- memcached_return_t
- memcached_verbosity (memcached_st *ptr,
- unsigned int verbosity);
-
+Compile and link with -lmemcached
-----------
memcached(1) servers referenced in the \ ``memcached_st``\ parameter.
-******
+------
RETURN
-******
+------
A value of type \ ``memcached_return_t``\ is returned
Use memcached_strerror() to translate this value to a printable string.
-****
+----
HOME
-****
+----
To find out more information please check:
`http://libmemcached.org/ <http://libmemcached.org/>`_
-******
-AUTHOR
-******
-
-
-Brian Aker, <brian@tangent.org>
-
-
--------
SEE ALSO
--------
Getting version information about the client and server
=======================================================
-
-Get library version
-
-
-*******
-LIBRARY
-*******
-
-
-C Client Library for memcached (libmemcached, -lmemcached)
-
-
+
--------
SYNOPSIS
--------
+#include <libmemcached/memcached.h>
+.. c:function:: const char * memcached_lib_version (void)
-.. code-block:: perl
+.. c:function:: memcached_return_t memcached_version (memcached_st *ptr)
- #include <libmemcached/memcached.h>
-
- const char *
- memcached_lib_version (void)
-
-
- memcached_return_t
- memcached_version (memcached_st *ptr)
+
+Compile and link with -lmemcached
memcached server return code.
-******
+------
RETURN
-******
+------
A string with the version of libmemcached driver is returned from
a printable string.
-****
+----
HOME
-****
+----
To find out more information please check:
`http://libmemcached.org/ <http://libmemcached.org/>`_
-******
-AUTHOR
-******
-
-
-Brian Aker, <brian@tangent.org>
-
-
--------
SEE ALSO
--------
memcapable - Checking a Memcached server capibilities and compatibility
=======================================================================
+.. index:: object: memcached_st
Check the server for compatibility and capabilities
For a full list of operations run the tool with the \ **--help**\ option.
-****
+----
HOME
-****
+----
To find out more infoerroration please check:
`http://libmemcached.org/ <http://libmemcached.org/>`_
-******
-AUTHOR
-******
-
-
-Brian Aker, <brian@tangent.org>
-
-
--------
SEE ALSO
--------