.\" Automatically generated by Pod::Man 2.23 (Pod::Simple 3.14) .\" .\" Standard preamble: .\" ======================================================================== .de Sp \" Vertical space (when we can't use .PP) .if t .sp .5v .if n .sp .. .de Vb \" Begin verbatim text .ft CW .nf .ne \\$1 .. .de Ve \" End verbatim text .ft R .fi .. .\" Set up some character translations and predefined strings. \*(-- will .\" give an unbreakable dash, \*(PI will give pi, \*(L" will give a left .\" double quote, and \*(R" will give a right double quote. \*(C+ will .\" give a nicer C++. Capital omega is used to do unbreakable dashes and .\" therefore won't be available. \*(C` and \*(C' expand to `' in nroff, .\" nothing in troff, for use with C<>. .tr \(*W- .ds C+ C\v'-.1v'\h'-1p'\s-2+\h'-1p'+\s0\v'.1v'\h'-1p' .ie n \{\ . ds -- \(*W- . ds PI pi . if (\n(.H=4u)&(1m=24u) .ds -- \(*W\h'-12u'\(*W\h'-12u'-\" diablo 10 pitch . if (\n(.H=4u)&(1m=20u) .ds -- \(*W\h'-12u'\(*W\h'-8u'-\" diablo 12 pitch . ds L" "" . ds R" "" . ds C` "" . ds C' "" 'br\} .el\{\ . ds -- \|\(em\| . ds PI \(*p . ds L" `` . ds R" '' 'br\} .\" .\" Escape single quotes in literal strings from groff's Unicode transform. .ie \n(.g .ds Aq \(aq .el .ds Aq ' .\" .\" If the F register is turned on, we'll generate index entries on stderr for .\" titles (.TH), headers (.SH), subsections (.SS), items (.Ip), and index .\" entries marked with X<> in POD. Of course, you'll have to process the .\" output yourself in some meaningful fashion. .ie \nF \{\ . de IX . tm Index:\\$1\t\\n%\t"\\$2" .. . nr % 0 . rr F .\} .el \{\ . de IX .. .\} .\" .\" Accent mark definitions (@(#)ms.acc 1.5 88/02/08 SMI; from UCB 4.2). .\" Fear. Run. Save yourself. No user-serviceable parts. . \" fudge factors for nroff and troff .if n \{\ . ds #H 0 . ds #V .8m . ds #F .3m . ds #[ \f1 . ds #] \fP .\} .if t \{\ . ds #H ((1u-(\\\\n(.fu%2u))*.13m) . ds #V .6m . ds #F 0 . ds #[ \& . ds #] \& .\} . \" simple accents for nroff and troff .if n \{\ . ds ' \& . ds ` \& . ds ^ \& . ds , \& . ds ~ ~ . ds / .\} .if t \{\ . ds ' \\k:\h'-(\\n(.wu*8/10-\*(#H)'\'\h"|\\n:u" . ds ` \\k:\h'-(\\n(.wu*8/10-\*(#H)'\`\h'|\\n:u' . ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'^\h'|\\n:u' . ds , \\k:\h'-(\\n(.wu*8/10)',\h'|\\n:u' . ds ~ \\k:\h'-(\\n(.wu-\*(#H-.1m)'~\h'|\\n:u' . ds / \\k:\h'-(\\n(.wu*8/10-\*(#H)'\z\(sl\h'|\\n:u' .\} . \" troff and (daisy-wheel) nroff accents .ds : \\k:\h'-(\\n(.wu*8/10-\*(#H+.1m+\*(#F)'\v'-\*(#V'\z.\h'.2m+\*(#F'.\h'|\\n:u'\v'\*(#V' .ds 8 \h'\*(#H'\(*b\h'-\*(#H' .ds o \\k:\h'-(\\n(.wu+\w'\(de'u-\*(#H)/2u'\v'-.3n'\*(#[\z\(de\v'.3n'\h'|\\n:u'\*(#] .ds d- \h'\*(#H'\(pd\h'-\w'~'u'\v'-.25m'\f2\(hy\fP\v'.25m'\h'-\*(#H' .ds D- D\\k:\h'-\w'D'u'\v'-.11m'\z\(hy\v'.11m'\h'|\\n:u' .ds th \*(#[\v'.3m'\s+1I\s-1\v'-.3m'\h'-(\w'I'u*2/3)'\s-1o\s+1\*(#] .ds Th \*(#[\s+2I\s-2\h'-\w'I'u*3/5'\v'-.3m'o\v'.3m'\*(#] .ds ae a\h'-(\w'a'u*4/10)'e .ds Ae A\h'-(\w'A'u*4/10)'E . \" corrections for vroff .if v .ds ~ \\k:\h'-(\\n(.wu*9/10-\*(#H)'\s-2\u~\d\s+2\h'|\\n:u' .if v .ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'\v'-.4m'^\v'.4m'\h'|\\n:u' . \" for low resolution devices (crt and lpr) .if \n(.H>23 .if \n(.V>19 \ \{\ . ds : e . ds 8 ss . ds o a . ds d- d\h'-1'\(ga . ds D- D\h'-1'\(hy . ds th \o'bp' . ds Th \o'LP' . ds ae ae . ds Ae AE .\} .rm #[ #] #H #V #F C .\" ======================================================================== .\" .IX Title "..::docs::libmemcached 3" .TH ..::docs::libmemcached 3 "2012-10-24" "" "libmemcached" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l .nh .SH "NAME" libmemcached \- Client library for memcached .SH "LIBRARY" .IX Header "LIBRARY" C Client Library for memcached (libmemcached, \-lmemcached) .SH "SYNOPSIS" .IX Header "SYNOPSIS" .Vb 1 \& #include .Ve .SH "DESCRIPTION" .IX Header "DESCRIPTION" \&\*(L"Memcached is a high-performance, distributed memory object caching system, generic in nature, but intended for use in speeding up dynamic web applications by alleviating database load.\*(R" .PP \&\fBlibmemcached\fR is a small, thread-safe client library for the memcached protocol. The code has all been written with an eye to allow for both web and embedded usage. It handles the work behind routing particular keys to specific servers that you specify (and values are matched based on server order as supplied by you). It implements both a modula and consistent method of object distribution. .PP There are multiple implemented routing and hashing methods. See the \&\fImemcached_behavior_set()\fR manpage. .PP All operations are performed against a \f(CW\*(C`memcached_st\*(C'\fR structure. These structures can either be dynamically allocated or statically allocated and then initialized by \fImemcached_create()\fR. Functions have been written in order to encapsulate the \f(CW\*(C`memcached_st\*(C'\fR. It is not recommended that you operate directly against the structure. .PP Nearly all functions return a \f(CW\*(C`memcached_return\*(C'\fR value. This value can be translated to a printable string with \fImemcached_strerror\fR\|(3). .PP Partitioning based on keys is supported in the library. Using the key partioning functions it is possible to group sets of object onto servers. .PP \&\f(CW\*(C`memcached_st\*(C'\fR structures are thread-safe, but each thread must contain its own structure (that is, if you want to share these among threads you must provide your own locking). No global variables are used in this library. .PP If you are working with \s-1GNU\s0 autotools you will want to add the following to your configure.ac to properly include libmemcached in your application. .PP \&\s-1PKG_CHECK_MODULES\s0(\s-1DEPS\s0, libmemcached >= 0.8.0) \&\s-1AC_SUBST\s0(\s-1DEPS_CFLAGS\s0) \&\s-1AC_SUBST\s0(\s-1DEPS_LIBS\s0) .PP Some features of the library must be enabled through \fImemcached_behavior_set()\fR. .PP Hope you enjoy it! .SH "CONSTANTS" .IX Header "CONSTANTS" A number of constants have been provided for in the library. .IP "\s-1MEMCACHED_DEFAULT_PORT\s0" 4 .IX Item "MEMCACHED_DEFAULT_PORT" The default port used by \fImemcached\fR\|(3). .IP "\s-1MEMCACHED_MAX_KEY\s0" 4 .IX Item "MEMCACHED_MAX_KEY" Default maximum size of a key (which includes the null pointer). Master keys have no limit, this only applies to keys used for storage. .IP "\s-1MEMCACHED_MAX_KEY\s0" 4 .IX Item "MEMCACHED_MAX_KEY" Default size of key (which includes the null pointer). .IP "\s-1MEMCACHED_MAX_HOST_LENGTH\s0" 4 .IX Item "MEMCACHED_MAX_HOST_LENGTH" Maximum allowed size of the hostname. .IP "\s-1MEMCACHED_VERSION_STRING\s0" 4 .IX Item "MEMCACHED_VERSION_STRING" String value of libmemcached version such as \*(L"1.23.4\*(R" .IP "\s-1MEMCACHED_MAJOR_VERSION\s0" 4 .IX Item "MEMCACHED_MAJOR_VERSION" Major version value. Such as 1.23.4, would be 1 .IP "\s-1MEMCACHED_MINOR_VERSION\s0" 4 .IX Item "MEMCACHED_MINOR_VERSION" Major version value. Such as 1.23.4, would be 23 .IP "\s-1MEMCACHED_MICRO_VERSION\s0" 4 .IX Item "MEMCACHED_MICRO_VERSION" Major version value. Such as 1.23.4, would be 4 .SH "THREADS AND PROCESSES" .IX Header "THREADS AND PROCESSES" When using threads or forked processes it is important to keep an instance of \f(CW\*(C`memcached_st\*(C'\fR per process or thread. Without creating your own locking structures you can not share a single \f(CW\*(C`memcached_st\*(C'\fR. You can though call \&\fImemcached_quit\fR\|(3) on a \f(CW\*(C`memcached_st\*(C'\fR and then use the resulting cloned structure. .SH "HOME" .IX Header "HOME" To find out more information please check: .SH "AUTHOR" .IX Header "AUTHOR" Brian Aker, .SH "SEE ALSO" .IX Header "SEE ALSO" \&\fImemcached\fR\|(1) \fIlibmemcached_examples\fR\|(3) \fIlibmemcached\fR\|(1) \fImemcat\fR\|(1) \fImemcp\fR\|(1) \fImemflush\fR\|(1) \fImemrm\fR\|(1) \fImemslap\fR\|(1) \fImemstat\fR\|(1) \fImemcached_fetch\fR\|(3) \fImemcached_replace\fR\|(3) \fImemcached_server_list_free\fR\|(3) \fIlibmemcached_examples\fR\|(3) \fImemcached_clone\fR\|(3) \fImemcached_free\fR\|(3) \fImemcached_server_add\fR\|(3) \fImemcached_server_push\fR\|(3) \fImemcached_add\fR\|(3) \fImemcached_get\fR\|(3) \fImemcached_server_count\fR\|(3) \fImemcached_servers_parse\fR\|(3) \fImemcached_create\fR\|(3) \fImemcached_increment\fR\|(3) \fImemcached_server_list\fR\|(3) \fImemcached_set\fR\|(3) \fImemcached_decrement\fR\|(3) \fImemcached_mget\fR\|(3) \fImemcached_server_list_append\fR\|(3) \fImemcached_strerror\fR\|(3) \fImemcached_delete\fR\|(3) \fImemcached_quit\fR\|(3) \fImemcached_server_list_count\fR\|(3) \fImemcached_verbosity\fR\|(3) \fImemcached_server_add_unix_socket\fR\|(3) \fImemcached_result_create\fR\|(3) \fImemcached_result_free\fR\|(3) \fImemcached_result_key_value\fR\|(3) \fImemcached_result_key_length\fR\|(3) \fImemcached_result_value\fR\|(3) \fImemcached_result_length\fR\|(3) \fImemcached_result_flags\fR\|(3) \fImemcached_result_cas\fR\|(3) \fImemcached_result_st\fR\|(3) \fImemcached_append\fR\|(3) \fImemcached_prepend\fR\|(3) \fImemcached_fetch_result\fR\|(3) \fImemerror\fR\|(1) \fImemcached_get_by_key\fR\|(3) \fImemcached_mget_by_key\fR\|(3) \fImemcached_delete_by_key\fR\|(3) \fImemcached_fetch_execute\fR\|(3) \fImemcached_callback_get\fR\|(3) \fImemcached_callback_set\fR\|(3) \fImemcached_version\fR\|(3) \fImemcached_lib_version\fR\|(3) \fImemcached_result_set_value\fR\|(3) \fImemcached_dump\fR\|(3) \fImemdump\fR\|(1) \fImemcached_set_memory_allocators\fR\|(3) \fImemcached_get_memory_allocators\fR\|(3) \fImemcached_get_user_data\fR\|(3) \fImemcached_set_user_data\fR\|(3)