Developing a
memcached
Application
1364
libmemcached
Function
Equivalent Core Function
memcached_prepend(memc, key,
key_length, value, value_length,
expiration, flags)
Prepends the specified
value
before the current
value of the specified
key
.
memcached_append(memc, key,
key_length, value, value_length,
expiration, flags)
Appends the specified
value
after the current
value of the specified
key
.
memcached_cas(memc, key, key_length,
value, value_length, expiration,
flags, cas)
Overwrites the data for a given key as long as the
corresponding
cas
value is still the same within
the server.
memcached_set_by_key(memc,
master_key, master_key_length, key,
key_length, value, value_length,
expiration, flags)
Similar to the generic
set()
, but has the option
of an additional master key that can be used to
identify an individual server.
memcached_add_by_key(memc,
master_key, master_key_length, key,
key_length, value, value_length,
expiration, flags)
Similar to the generic
add()
, but has the option
of an additional master key that can be used to
identify an individual server.
memcached_replace_by_key(memc,
master_key, master_key_length, key,
key_length, value, value_length,
expiration, flags)
Similar to the generic
replace()
, but has the
option of an additional master key that can be
used to identify an individual server.
memcached_prepend_by_key(memc,
master_key, master_key_length, key,
key_length, value, value_length,
expiration, flags)
Similar to the
memcached_prepend()
, but has
the option of an additional master key that can be
used to identify an individual server.
memcached_append_by_key(memc,
master_key, master_key_length, key,
key_length, value, value_length,
expiration, flags)
Similar to the
memcached_append()
, but has
the option of an additional master key that can be
used to identify an individual server.
memcached_cas_by_key(memc,
master_key, master_key_length, key,
key_length, value, value_length,
expiration, flags)
Similar to the
memcached_cas()
, but has the
option of an additional master key that can be
used to identify an individual server.
The
by_key
methods add two further arguments that define the master key, to be used and applied
during the hashing stage for selecting the servers. You can see this in the following definition:
memcached_return
memcached_set_by_key(memcached_st *ptr,
const char *master_key,
size_t master_key_length,
const char *key,
size_t key_length,
const char *value,
size_t value_length,
time_t expiration,
uint32_t flags);
All the functions return a value of type
memcached_return
, which you can compare against the
MEMCACHED_SUCCESS
constant.
15.6.3.3.4.
libmemcached
Get Functions
The
libmemcached
functions provide both direct access to a single item, and a multiple-key request
mechanism that provides much faster responses when fetching a large number of keys simultaneously.
Содержание 5.0
Страница 1: ...MySQL 5 0 Reference Manual ...
Страница 18: ...xviii ...
Страница 60: ...40 ...
Страница 396: ...376 ...
Страница 578: ...558 ...
Страница 636: ...616 ...
Страница 844: ...824 ...
Страница 1234: ...1214 ...
Страница 1426: ...MySQL Proxy Scripting 1406 The following diagram shows an overview of the classes exposed by MySQL Proxy ...
Страница 1427: ...MySQL Proxy Scripting 1407 ...
Страница 1734: ...1714 ...
Страница 1752: ...1732 ...
Страница 1783: ...Configuring Connector ODBC 1763 ...
Страница 1793: ...Connector ODBC Examples 1773 ...
Страница 1839: ...Connector Net Installation 1819 2 You must choose the type of installation to perform ...
Страница 1842: ...Connector Net Installation 1822 5 Once the installation has been completed click Finish to exit the installer ...
Страница 1864: ...Connector Net Visual Studio Integration 1844 Figure 20 24 Debug Stepping Figure 20 25 Function Stepping 1 of 2 ...
Страница 2850: ...2830 ...
Страница 2854: ...2834 ...
Страница 2928: ...2908 ...
Страница 3000: ...2980 ...
Страница 3122: ...3102 ...
Страница 3126: ...3106 ...
Страница 3174: ...3154 ...
Страница 3232: ...3212 ...