X-Git-Url: https://git.m6w6.name/?a=blobdiff_plain;f=libmemcached%2Fconfiguration.html;h=8f59e94a496e45a3664079aae924532bce47e2aa;hb=5fe34bb79f817fe734d3e300720ac8a361454f39;hp=115f183c3cbb18ef6ea14a49bfdda95090ceb919;hpb=c6fde8b6a27b6af31f0cf26a9cdccd54cd25734a;p=awesomized%2Flibmemcached diff --git a/libmemcached/configuration.html b/libmemcached/configuration.html index 115f183c..8f59e94a 100644 --- a/libmemcached/configuration.html +++ b/libmemcached/configuration.html @@ -21,10 +21,10 @@ - - - - + + + + @@ -182,19 +182,51 @@

libmemcached Configuration¶

SYNOPSIS¶

-
-
#include <libmemcached-1.0/memcached.h>

Compile and link with -lmemcached

-
+
+
#include <libmemcached-1.0/memcached.h>
+
Compile and link with -lmemcached
-memcached_st *memcached(const char *string, size_t string_length)¶
-
+memcached_st *memcached(const char *string, size_t string_length)¶
+
+++ + + + + + +
Parameters:
    +
  • string -- configuration string
  • +
  • string_length -- length of the configuration string without any terminating zero
  • +
+
Returns:

allocated and initialized memcached_st struct

+
+
-memcached_return_t libmemcached_check_configuration(const char *option_string, size_t length, char *error_buffer, size_t error_buffer_size)¶
-
+memcached_return_t libmemcached_check_configuration(const char *option_string, size_t length, char *error_buffer, size_t error_buffer_size)¶
+
+++ + + + + + +
Parameters:
    +
  • option_string -- configuration string
  • +
  • length -- length of the configuration string without any terminating zero
  • +
  • error_buffer -- buffer used to store any error message
  • +
  • error_buffer_size -- available size of the error_buffer
  • +
+
Returns:

memcached_return_t indicating success

+
+
@@ -206,7 +238,7 @@ that you can use in your application directly.

General Options:¶

---SERVER=<servername>:<optional_port>/?<optional_weight>
+--SERVER=<servername>:<optional_port>/?<optional_weight>

Provide a servername to be used by the client.

Providing a weight will cause weighting to occur with all hosts with each server getting a default weight of 1.

@@ -214,7 +246,7 @@ server getting a default weight of 1.

---SOCKET="<filepath>/?<optional_weight>"
+--SOCKET="<filepath>/?<optional_weight>"

Provide a filepath to a UNIX socket file. Providing a weight will cause weighting to occur with all hosts with each server getting a default weight of 1.

@@ -222,32 +254,32 @@ of 1.

---VERIFY-KEY
+--VERIFY-KEY

Verify that keys that are being used fit within the design of the protocol being used.

---REMOVE_FAILED_SERVERS
-

Enable the behavior MEMCACHED_BEHAVIOR_REMOVE_FAILED_SERVERS.

+--REMOVE_FAILED_SERVERS +

Enable the behavior MEMCACHED_BEHAVIOR_REMOVE_FAILED_SERVERS.

---BINARY-PROTOCOL
+--BINARY-PROTOCOL

Force all connections to use the binary protocol.

---BUFFER-REQUESTS
-

Please see MEMCACHED_BEHAVIOR_BUFFER_REQUESTS.

+--BUFFER-REQUESTS +

Please see MEMCACHED_BEHAVIOR_BUFFER_REQUESTS.

---CONFIGURE-FILE=
+--CONFIGURE-FILE=

Provide a configuration file to be used to load requests. Beware that by using a configuration file libmemcached will reset memcached_st based on information only contained in the file.

@@ -255,71 +287,71 @@ on information only contained in the file.

---CONNECT-TIMEOUT=
-

See memcached_behavior_set() for MEMCACHED_BEHAVIOR_CONNECT_TIMEOUT.

+--CONNECT-TIMEOUT= +

See memcached_behavior_set() for MEMCACHED_BEHAVIOR_CONNECT_TIMEOUT.

---DISTRIBUTION=
+--DISTRIBUTION=

Set the distribution model used by the client. See memcached_behavior_set() for more details.

---HASH=
+--HASH=

Set the hashing algorithm used for placing keys on servers.

---HASH-WITH-NAMESPACE
+--HASH-WITH-NAMESPACE

When enabled the prefix key will be added to the key when determining which server to store the data in.

---NOREPLY
-

Enable “no reply” for all calls that support this. It is highly recommended +--NOREPLY +

Enable "no reply" for all calls that support this. It is highly recommended that you use this option with the binary protocol only.

---NUMBER-OF-REPLICAS=
+--NUMBER-OF-REPLICAS=

Set the number of servers that keys will be replicated to.

---RANDOMIZE-REPLICA-READ
+--RANDOMIZE-REPLICA-READ

Select randomly the server within the replication pool to read from.

---SORT-HOSTS
+--SORT-HOSTS

When adding new servers always calculate their distribution based on sorted naming order.

---SUPPORT-CAS
-

See memcached_behavior_set() for MEMCACHED_BEHAVIOR_SUPPORT_CAS

+--SUPPORT-CAS +

See memcached_behavior_set() for MEMCACHED_BEHAVIOR_SUPPORT_CAS

---USE-UDP
-

See memcached_behavior_set() for MEMCACHED_BEHAVIOR_USE_UDP

+--USE-UDP +

See memcached_behavior_set() for MEMCACHED_BEHAVIOR_USE_UDP

---NAMESPACE=
+--NAMESPACE=

A namespace is a container that provides context for keys, only other requests that know the namespace can access these values. This is accomplished by prepending the namespace value to all keys.

@@ -330,13 +362,13 @@ accomplished by prepending the namespace value to all keys.

Memcached Pool Options:¶

---POOL-MIN
+--POOL-MIN

Initial size of pool.

---POOL-MAX
+--POOL-MAX

Maximize size of the pool.

@@ -345,75 +377,75 @@ accomplished by prepending the namespace value to all keys.

I/O Options:¶

---TCP-NODELAY
-

See memcached_behavior_set() for MEMCACHED_BEHAVIOR_TCP_NODELAY

+--TCP-NODELAY +

See memcached_behavior_set() for MEMCACHED_BEHAVIOR_TCP_NODELAY

---TCP-KEEPALIVE
+--TCP-KEEPALIVE

See memcached_behavior_set() for MEMCACHED_BEHAVIOR_TCP_KEEPALIVE

---RETRY-TIMEOUT=
-

See memcached_behavior_set() for MEMCACHED_BEHAVIOR_RETRY_TIMEOUT

+--RETRY-TIMEOUT= +

See memcached_behavior_set() for MEMCACHED_BEHAVIOR_RETRY_TIMEOUT

---SERVER-FAILURE-LIMIT=
-

See memcached_behavior_set() for MEMCACHED_BEHAVIOR_SERVER_FAILURE_LIMIT

+--SERVER-FAILURE-LIMIT= +

See memcached_behavior_set() for MEMCACHED_BEHAVIOR_SERVER_FAILURE_LIMIT

---SND-TIMEOUT=
-

See memcached_behavior_set() for MEMCACHED_BEHAVIOR_SND_TIMEOUT

+--SND-TIMEOUT= +

See memcached_behavior_set() for MEMCACHED_BEHAVIOR_SND_TIMEOUT

---SOCKET-RECV-SIZE=
-

See memcached_behavior_set() for MEMCACHED_BEHAVIOR_SOCKET_RECV_SIZE

+--SOCKET-RECV-SIZE= +

See memcached_behavior_set() for MEMCACHED_BEHAVIOR_SOCKET_RECV_SIZE

---SOCKET-SEND-SIZE=
-

See memcached_behavior_set() for MEMCACHED_BEHAVIOR_SOCKET_SEND_SIZE

+--SOCKET-SEND-SIZE= +

See memcached_behavior_set() for MEMCACHED_BEHAVIOR_SOCKET_SEND_SIZE

---POLL-TIMEOUT=
-

Set the timeout used by poll(3).

+--POLL-TIMEOUT= +

Set the timeout used by poll(3).

---IO-BYTES-WATERMARK=
+--IO-BYTES-WATERMARK=
---IO-KEY-PREFETCH=
+--IO-KEY-PREFETCH=
---IO-MSG-WATERMARK=
+--IO-MSG-WATERMARK=
---TCP-KEEPIDLE
+--TCP-KEEPIDLE
---RCV-TIMEOUT=
+--RCV-TIMEOUT=
@@ -421,26 +453,26 @@ accomplished by prepending the namespace value to all keys.

Other Options:¶

-INCLUDE
+INCLUDE

Include a file in configuration. Unlike --CONFIGURE-FILE= this will not reset memcached_st.

-RESET
+RESET

Reset memcached_st and continue to process.

-END
+END

End configuration processing.

-ERROR
+ERROR

End configuration processing and throw an error.

@@ -450,13 +482,13 @@ Unlike --CONFIGURE-

ENVIRONMENT¶

-LIBMEMCACHED¶
+LIBMEMCACHED¶

RETURN VALUE¶

-

memcached() returns a pointer to the memcached_st that was created (or +

memcached() returns a pointer to the memcached_st that was created (or initialized). On an allocation failure, it returns NULL.