memcached 1.7.0 → 1.7.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +9 -9
- checksums.yaml.gz.sig +0 -0
- data.tar.gz.sig +0 -0
- data/CHANGELOG +4 -0
- data/Manifest +2 -36
- data/README.rdoc +2 -2
- data/Rakefile +1 -0
- data/ext/extconf.rb +1 -1
- data/ext/lib64/libmemcached.la +41 -0
- data/ext/lib64/pkgconfig/libmemcached.pc +10 -0
- data/ext/libmemcached-0.32/Makefile.am +1 -1
- data/ext/libmemcached-0.32/Makefile.in +242 -162
- data/ext/libmemcached-0.32/aclocal.m4 +533 -342
- data/ext/libmemcached-0.32/config.h.in +5 -3
- data/ext/libmemcached-0.32/configure +449 -431
- data/ext/libmemcached-0.32/configure.ac +0 -2
- data/memcached.gemspec +0 -0
- data/memcached.pem +16 -16
- metadata +26 -59
- metadata.gz.sig +0 -0
- data/ext/libmemcached-0.32/docs/Makefile.am +0 -415
- data/ext/libmemcached-0.32/docs/Makefile.in +0 -920
- data/ext/libmemcached-0.32/docs/libmemcached.pod +0 -123
- data/ext/libmemcached-0.32/docs/libmemcached_examples.pod +0 -115
- data/ext/libmemcached-0.32/docs/libmemcachedutil.pod +0 -40
- data/ext/libmemcached-0.32/docs/memcached_analyze.pod +0 -52
- data/ext/libmemcached-0.32/docs/memcached_auto.pod +0 -97
- data/ext/libmemcached-0.32/docs/memcached_behavior.pod +0 -224
- data/ext/libmemcached-0.32/docs/memcached_callback.pod +0 -123
- data/ext/libmemcached-0.32/docs/memcached_create.pod +0 -61
- data/ext/libmemcached-0.32/docs/memcached_delete.pod +0 -54
- data/ext/libmemcached-0.32/docs/memcached_dump.pod +0 -53
- data/ext/libmemcached-0.32/docs/memcached_flush.pod +0 -46
- data/ext/libmemcached-0.32/docs/memcached_flush_buffers.pod +0 -42
- data/ext/libmemcached-0.32/docs/memcached_generate_hash_value.pod +0 -57
- data/ext/libmemcached-0.32/docs/memcached_get.pod +0 -161
- data/ext/libmemcached-0.32/docs/memcached_memory_allocators.pod +0 -73
- data/ext/libmemcached-0.32/docs/memcached_pool.pod +0 -77
- data/ext/libmemcached-0.32/docs/memcached_quit.pod +0 -47
- data/ext/libmemcached-0.32/docs/memcached_sasl.pod +0 -63
- data/ext/libmemcached-0.32/docs/memcached_server_st.pod +0 -75
- data/ext/libmemcached-0.32/docs/memcached_servers.pod +0 -102
- data/ext/libmemcached-0.32/docs/memcached_set.pod +0 -187
- data/ext/libmemcached-0.32/docs/memcached_stats.pod +0 -82
- data/ext/libmemcached-0.32/docs/memcached_strerror.pod +0 -46
- data/ext/libmemcached-0.32/docs/memcached_user_data.pod +0 -49
- data/ext/libmemcached-0.32/docs/memcached_verbosity.pod +0 -41
- data/ext/libmemcached-0.32/docs/memcached_version.pod +0 -56
- data/ext/libmemcached-0.32/docs/memcat.pod +0 -37
- data/ext/libmemcached-0.32/docs/memcp.pod +0 -40
- data/ext/libmemcached-0.32/docs/memdump.pod +0 -31
- data/ext/libmemcached-0.32/docs/memerror.pod +0 -30
- data/ext/libmemcached-0.32/docs/memflush.pod +0 -35
- data/ext/libmemcached-0.32/docs/memrm.pod +0 -34
- data/ext/libmemcached-0.32/docs/memslap.pod +0 -33
- data/ext/libmemcached-0.32/docs/memstat.pod +0 -35
@@ -1,123 +0,0 @@
|
|
1
|
-
=head1 NAME
|
2
|
-
|
3
|
-
memcached_callback_get, memcached_callback_set - Get and set a callback
|
4
|
-
|
5
|
-
=head1 LIBRARY
|
6
|
-
|
7
|
-
C Client Library for memcached (libmemcached, -lmemcached)
|
8
|
-
|
9
|
-
=head1 SYNOPSIS
|
10
|
-
|
11
|
-
#include <memcached.h>
|
12
|
-
|
13
|
-
memcached_return
|
14
|
-
memcached_callback_set (memcached_st *ptr,
|
15
|
-
memcached_callback flag,
|
16
|
-
void *data);
|
17
|
-
|
18
|
-
void *
|
19
|
-
memcached_callback_get (memcached_st *ptr,
|
20
|
-
memcached_callback flag,
|
21
|
-
memcached_return *error);
|
22
|
-
|
23
|
-
=head1 DESCRIPTION
|
24
|
-
|
25
|
-
libmemcached(3) can have callbacks set key execution points. These either
|
26
|
-
provide function calls at points in the code, or return pointers to
|
27
|
-
structures for particular usages.
|
28
|
-
|
29
|
-
memcached_callback_get() takes a callback flag and returns the structure or
|
30
|
-
function set by memcached_callback_set().
|
31
|
-
|
32
|
-
memcached_callback_set() changes the function/structure assigned by a
|
33
|
-
callback flag. No connections are reset.
|
34
|
-
|
35
|
-
You can use MEMCACHED_CALLBACK_USER_DATA to provide custom context if required for any
|
36
|
-
of the callbacks
|
37
|
-
|
38
|
-
=over 4
|
39
|
-
|
40
|
-
=item MEMCACHED_CALLBACK_CLEANUP_FUNCTION
|
41
|
-
|
42
|
-
When memcached_delete() is called this function will be excuted. At the
|
43
|
-
point of its execution all connections have been closed.
|
44
|
-
|
45
|
-
=item MEMCACHED_CALLBACK_CLONE_FUNCTION
|
46
|
-
|
47
|
-
When memcached_delete() is called this function will be excuted. At the
|
48
|
-
point of its execution all connections have been closed.
|
49
|
-
|
50
|
-
=item MEMCACHED_CALLBACK_PREFIX_KEY
|
51
|
-
|
52
|
-
You can set a value which will be used to create a domain for your keys.
|
53
|
-
The value specified here will be prefixed to each of your keys. The value can not
|
54
|
-
be greater then MEMCACHED_PREFIX_KEY_MAX_SIZE - 1 and will reduce MEMCACHED_MAX_KEY by
|
55
|
-
the value of your key. The prefix key is only applied to the primary key,
|
56
|
-
not the master key. MEMCACHED_FAILURE will be returned if no key is set. In the case
|
57
|
-
of a key which is too long MEMCACHED_BAD_KEY_PROVIDED will be returned.
|
58
|
-
|
59
|
-
=item MEMCACHED_CALLBACK_USER_DATA
|
60
|
-
|
61
|
-
This allows you to store a pointer to a specifc piece of data. This can be
|
62
|
-
retrieved from inside of memcached_fetch_execute(). Cloning a memcached_st
|
63
|
-
will copy the pointer to the clone.
|
64
|
-
|
65
|
-
=item MEMCACHED_CALLBACK_MALLOC_FUNCTION
|
66
|
-
|
67
|
-
DEPRECATED: use memcached_set_memory_allocators instead.
|
68
|
-
|
69
|
-
=item MEMCACHED_CALLBACK_REALLOC_FUNCTION
|
70
|
-
|
71
|
-
DEPRECATED: use memcached_set_memory_allocators instead.
|
72
|
-
|
73
|
-
=item MEMCACHED_CALLBACK_FREE_FUNCTION
|
74
|
-
|
75
|
-
DEPRECATED: use memcached_set_memory_allocators instead.
|
76
|
-
|
77
|
-
=item MEMCACHED_CALLBACK_GET_FAILURE
|
78
|
-
|
79
|
-
This function implements the read through cache behavior. On failure of retrieval this callback will be called.
|
80
|
-
You are responsible for populating the result object provided. This result object will then be stored in the server and
|
81
|
-
returned to the calling process. You must clone the memcached_st in order to
|
82
|
-
make use of it. The value will be stored only if you return
|
83
|
-
MEMCACHED_SUCCESS or MEMCACHED_BUFFERED. Returning MEMCACHED_BUFFERED will
|
84
|
-
cause the object to be buffered and not sent immediatly (if this is the default behavior based on your connection setup this will happen automatically).
|
85
|
-
|
86
|
-
The prototype for this is:
|
87
|
-
memcached_return (*memcached_trigger_key)(memcached_st *ptr, char *key, size_t key_length, memcached_result_st *result);
|
88
|
-
|
89
|
-
=item MEMCACHED_CALLBACK_DELETE_TRIGGER
|
90
|
-
|
91
|
-
This function implements a trigger upon successful deletion of a key. The memcached_st structure will need to be cloned
|
92
|
-
in order to make use of it.
|
93
|
-
|
94
|
-
The prototype for this is:
|
95
|
-
typedef memcached_return (*memcached_trigger_delete_key)(memcached_st *ptr, char *key, size_t key_length);
|
96
|
-
|
97
|
-
|
98
|
-
=back
|
99
|
-
|
100
|
-
=head1 RETURN
|
101
|
-
|
102
|
-
memcached_callback_get() return the function or structure that was provided.
|
103
|
-
Upon error, nothing is set, null is returned, and the memcached_return
|
104
|
-
argument is set to MEMCACHED_FAILURE.
|
105
|
-
|
106
|
-
memcached_callback_set() returns MEMCACHED_SUCCESS upon successful setting,
|
107
|
-
otherwise MEMCACHED_FAILURE on error.
|
108
|
-
|
109
|
-
=head1 HOME
|
110
|
-
|
111
|
-
To find out more information please check:
|
112
|
-
L<http://tangent.org/552/libmemcached.html>
|
113
|
-
|
114
|
-
=head1 AUTHOR
|
115
|
-
|
116
|
-
Brian Aker, E<lt>brian@tangent.orgE<gt>
|
117
|
-
|
118
|
-
=head1 SEE ALSO
|
119
|
-
|
120
|
-
memcached(1) libmemcached(3) memcached_strerror(3)
|
121
|
-
|
122
|
-
=cut
|
123
|
-
|
@@ -1,61 +0,0 @@
|
|
1
|
-
=head1 NAME
|
2
|
-
|
3
|
-
memcached_create, memcached_free - Create a memcached_st structure
|
4
|
-
|
5
|
-
=head1 LIBRARY
|
6
|
-
|
7
|
-
C Client Library for memcached (libmemcached, -lmemcached)
|
8
|
-
|
9
|
-
=head1 SYNOPSIS
|
10
|
-
|
11
|
-
#include <memcached.h>
|
12
|
-
|
13
|
-
memcached_st *memcached_create (memcached_st *ptr);
|
14
|
-
|
15
|
-
void memcached_free (memcached_st *ptr);
|
16
|
-
|
17
|
-
memcached_st *memcached_clone(memcached_st *clone, memcached_st *source);
|
18
|
-
|
19
|
-
=head1 DESCRIPTION
|
20
|
-
|
21
|
-
memcached_create() is used to create a C<memcached_st> structure that will then
|
22
|
-
be used by other libmemcached(3) functions to communicate with the server. You
|
23
|
-
should either pass a statically declared C<memcached_st> to memcached_create() or
|
24
|
-
a NULL. If a NULL passed in then a structure is allocated for you.
|
25
|
-
|
26
|
-
memcached_clone() is similar to memcached_create(3) but it copies the
|
27
|
-
defaults and list of servers from the source C<memcached_st>. If you pass a null as
|
28
|
-
the argument for the source to clone, it is the same as a call to memcached_create().
|
29
|
-
If the clone argument is NULL a C<memcached_st> will be allocated for you.
|
30
|
-
If you pass a pointer to a memory area for the clone pointer, make sure you
|
31
|
-
memset it to 0 (unless you got the clone from a factory method in libmemcached).
|
32
|
-
|
33
|
-
To clean up memory associated with a C<memcached_st> structure you should pass
|
34
|
-
it to memcached_free() when you are finished using it. memcached_free() is
|
35
|
-
the only way to make sure all memory is deallocated when you finish using
|
36
|
-
the structure.
|
37
|
-
|
38
|
-
=head1 RETURN
|
39
|
-
|
40
|
-
memcached_create() returns a pointer to the memcached_st that was created
|
41
|
-
(or initialized). On an allocation failure, it returns NULL.
|
42
|
-
|
43
|
-
memcached_clone() returns a pointer to the memcached_st that was created
|
44
|
-
(or initialized). On an allocation failure, it returns NULL. If you pass in
|
45
|
-
a preallocated structure it must be cleared first (aka memset()).
|
46
|
-
|
47
|
-
=head1 HOME
|
48
|
-
|
49
|
-
To find out more information please check:
|
50
|
-
L<http://tangent.org/552/libmemcached.html>
|
51
|
-
|
52
|
-
=head1 AUTHOR
|
53
|
-
|
54
|
-
Brian Aker, E<lt>brian@tangent.orgE<gt>
|
55
|
-
|
56
|
-
=head1 SEE ALSO
|
57
|
-
|
58
|
-
memcached(1) libmemcached(3) memcached_strerror(3)
|
59
|
-
|
60
|
-
=cut
|
61
|
-
|
@@ -1,54 +0,0 @@
|
|
1
|
-
=head1 NAME
|
2
|
-
|
3
|
-
memcached_delete - Delete a key
|
4
|
-
|
5
|
-
=head1 LIBRARY
|
6
|
-
|
7
|
-
C Client Library for memcached (libmemcached, -lmemcached)
|
8
|
-
|
9
|
-
=head1 SYNOPSIS
|
10
|
-
|
11
|
-
#include <memcached.h>
|
12
|
-
|
13
|
-
memcached_return
|
14
|
-
memcached_delete (memcached_st *ptr,
|
15
|
-
const char *key, size_t key_length,
|
16
|
-
time_t expiration);
|
17
|
-
|
18
|
-
memcached_return
|
19
|
-
memcached_delete_by_key (memcached_st *ptr,
|
20
|
-
const char *master_key, size_t master_key_length,
|
21
|
-
const char *key, size_t key_length,
|
22
|
-
time_t expiration);
|
23
|
-
|
24
|
-
=head1 DESCRIPTION
|
25
|
-
|
26
|
-
memcached_delete() is used to delete a particular key. An expiration value
|
27
|
-
can be applied so that the key is deleted after that many seconds.
|
28
|
-
memcached_delete_by_key() works the same, but it takes a master key to
|
29
|
-
find the given value.
|
30
|
-
|
31
|
-
=head1 RETURN
|
32
|
-
|
33
|
-
A value of type C<memcached_return> is returned
|
34
|
-
On success that value will be C<MEMCACHED_SUCCESS>.
|
35
|
-
Use memcached_strerror() to translate this value to a printable string.
|
36
|
-
|
37
|
-
If you are using the non-blocking mode of the library, success only
|
38
|
-
means that the message was queued for delivery.
|
39
|
-
|
40
|
-
=head1 HOME
|
41
|
-
|
42
|
-
To find out more information please check:
|
43
|
-
L<http://tangent.org/552/libmemcached.html>
|
44
|
-
|
45
|
-
=head1 AUTHOR
|
46
|
-
|
47
|
-
Brian Aker, E<lt>brian@tangent.orgE<gt>
|
48
|
-
|
49
|
-
=head1 SEE ALSO
|
50
|
-
|
51
|
-
memcached(1) libmemcached(3) memcached_strerror(3)
|
52
|
-
|
53
|
-
=cut
|
54
|
-
|
@@ -1,53 +0,0 @@
|
|
1
|
-
=head1 NAME
|
2
|
-
|
3
|
-
memcached_dump - get a list of keys found on memcached servers
|
4
|
-
|
5
|
-
=head1 LIBRARY
|
6
|
-
|
7
|
-
C Client Library for memcached (libmemcached, -lmemcached)
|
8
|
-
|
9
|
-
=head1 SYNOPSIS
|
10
|
-
|
11
|
-
#include <memcached.h>
|
12
|
-
|
13
|
-
memcached_return
|
14
|
-
memcached_dump (memcached_st *ptr,
|
15
|
-
memcached_dump_func *function,
|
16
|
-
void *context,
|
17
|
-
uint32_t number_of_callbacks);
|
18
|
-
|
19
|
-
typedef memcached_return (*memcached_dump_func)(memcached_st *ptr,
|
20
|
-
const char *key,
|
21
|
-
size_t key_length,
|
22
|
-
void *context);
|
23
|
-
|
24
|
-
=head1 DESCRIPTION
|
25
|
-
|
26
|
-
memcached_dump() is used to get a list of keys found memcached(1) servers.
|
27
|
-
Because memcached(1) does not guarentee to dump all keys you can not assume
|
28
|
-
you have fetched all keys from the server. The function takes an array
|
29
|
-
of callbacks that it will use to execute on keys as they are found.
|
30
|
-
|
31
|
-
Currently the binar protocol is not supported.
|
32
|
-
|
33
|
-
=head1 RETURN
|
34
|
-
|
35
|
-
A value of type C<memcached_return> is returned
|
36
|
-
On success that value will be C<MEMCACHED_SUCCESS>.
|
37
|
-
Use memcached_strerror() to translate this value to a printable string.
|
38
|
-
|
39
|
-
=head1 HOME
|
40
|
-
|
41
|
-
To find out more information please check:
|
42
|
-
L<http://tangent.org/552/libmemcached.html>
|
43
|
-
|
44
|
-
=head1 AUTHOR
|
45
|
-
|
46
|
-
Brian Aker, E<lt>brian@tangent.orgE<gt>
|
47
|
-
|
48
|
-
=head1 SEE ALSO
|
49
|
-
|
50
|
-
memcached(1) libmemcached(3) memcached_strerror(3)
|
51
|
-
|
52
|
-
=cut
|
53
|
-
|
@@ -1,46 +0,0 @@
|
|
1
|
-
=head1 NAME
|
2
|
-
|
3
|
-
memcached_flush - wipe contents of memcached servers
|
4
|
-
|
5
|
-
=head1 LIBRARY
|
6
|
-
|
7
|
-
C Client Library for memcached (libmemcached, -lmemcached)
|
8
|
-
|
9
|
-
=head1 SYNOPSIS
|
10
|
-
|
11
|
-
#include <memcached.h>
|
12
|
-
|
13
|
-
memcached_return
|
14
|
-
memcached_flush (memcached_st *ptr,
|
15
|
-
time_t expiration);
|
16
|
-
|
17
|
-
=head1 DESCRIPTION
|
18
|
-
|
19
|
-
memcached_flush() is used to wipe clean the contents of memcached(1) servers.
|
20
|
-
It will either do this immediately or expire the content based on the
|
21
|
-
expiration time passed to the method (a value of zero causes an immediate
|
22
|
-
flush). The operation is not atomic to multiple servers, just atomic to a
|
23
|
-
single server. That is, it will flush the servers in the order that they were
|
24
|
-
added.
|
25
|
-
|
26
|
-
=head1 RETURN
|
27
|
-
|
28
|
-
A value of type C<memcached_return> is returned
|
29
|
-
On success that value will be C<MEMCACHED_SUCCESS>.
|
30
|
-
Use memcached_strerror() to translate this value to a printable string.
|
31
|
-
|
32
|
-
=head1 HOME
|
33
|
-
|
34
|
-
To find out more information please check:
|
35
|
-
L<http://tangent.org/552/libmemcached.html>
|
36
|
-
|
37
|
-
=head1 AUTHOR
|
38
|
-
|
39
|
-
Brian Aker, E<lt>brian@tangent.orgE<gt>
|
40
|
-
|
41
|
-
=head1 SEE ALSO
|
42
|
-
|
43
|
-
memcached(1) libmemcached(3) memcached_strerror(3)
|
44
|
-
|
45
|
-
=cut
|
46
|
-
|
@@ -1,42 +0,0 @@
|
|
1
|
-
=head1 NAME
|
2
|
-
|
3
|
-
memcached_flush_buffers - Flush buffers and send buffered commands
|
4
|
-
|
5
|
-
=head1 LIBRARY
|
6
|
-
|
7
|
-
C Client Library for memcached (libmemcached, -lmemcached)
|
8
|
-
|
9
|
-
=head1 SYNOPSIS
|
10
|
-
|
11
|
-
#include <memcached.h>
|
12
|
-
|
13
|
-
memcached_return
|
14
|
-
memcached_flush_buffers (memcached_st *ptr);
|
15
|
-
|
16
|
-
=head1 DESCRIPTION
|
17
|
-
|
18
|
-
memcached_flush_buffers() is used in conjunction with
|
19
|
-
MEMCACHED_BEHAVIOR_BUFFER_REQUESTS (see memcached_behavior(3)) to flush
|
20
|
-
all buffers by sending the buffered commands to the server for processing..
|
21
|
-
|
22
|
-
=head1 RETURN
|
23
|
-
|
24
|
-
A value of type C<memcached_return> is returned
|
25
|
-
On success that value will be C<MEMCACHED_SUCCESS>.
|
26
|
-
Use memcached_strerror() to translate this value to a printable string.
|
27
|
-
|
28
|
-
=head1 HOME
|
29
|
-
|
30
|
-
To find out more information please check:
|
31
|
-
L<http://tangent.org/552/libmemcached.html>
|
32
|
-
|
33
|
-
=head1 AUTHOR
|
34
|
-
|
35
|
-
Trond Norbye, E<lt>trond.norbye@sun.comE<gt>
|
36
|
-
|
37
|
-
=head1 SEE ALSO
|
38
|
-
|
39
|
-
memcached(1) libmemcached(3) memcached_strerror(3) memcached_behavior(3)
|
40
|
-
|
41
|
-
=cut
|
42
|
-
|
@@ -1,57 +0,0 @@
|
|
1
|
-
=head1 NAME
|
2
|
-
|
3
|
-
memcached_generate_hash_value - Hash a key value
|
4
|
-
|
5
|
-
=head1 LIBRARY
|
6
|
-
|
7
|
-
C Client Library for memcached (libmemcached, -lmemcached)
|
8
|
-
|
9
|
-
=head1 SYNOPSIS
|
10
|
-
|
11
|
-
#include <memcached.h>
|
12
|
-
|
13
|
-
uint32_t
|
14
|
-
memcached_generate_hash_value (const char *key,
|
15
|
-
size_t key_length,
|
16
|
-
memcached_hash hash_algorithm);
|
17
|
-
|
18
|
-
uint32_t
|
19
|
-
memcached_generate_hash (memcached_st *ptr,
|
20
|
-
const char *key,
|
21
|
-
size_t key_length);
|
22
|
-
|
23
|
-
=head1 DESCRIPTION
|
24
|
-
|
25
|
-
memcached_generate_hash_value() allows you to hash a key using one of
|
26
|
-
the hash fuctions defined in the library. This method is provided for
|
27
|
-
the convenience of higher-level language bindings and is not necessary
|
28
|
-
for normal memcache operations.
|
29
|
-
|
30
|
-
The allowed hash algorithm constants are listed in the manpage for
|
31
|
-
memcached_behavior_set().
|
32
|
-
|
33
|
-
memcached_generate_hash() takes a memcached_st struture and produces
|
34
|
-
the hash value that would have been generated based on the defaults
|
35
|
-
of the memcached_st structure.
|
36
|
-
|
37
|
-
=head1 RETURN
|
38
|
-
|
39
|
-
A 32-bit integer which is the result of hashing the given key.
|
40
|
-
For 64-bit hash algorithms, only the least-significant 32 bits are
|
41
|
-
returned.
|
42
|
-
|
43
|
-
=head1 HOME
|
44
|
-
|
45
|
-
To find out more information please check:
|
46
|
-
L<http://tangent.org/552/libmemcached.html>
|
47
|
-
|
48
|
-
=head1 AUTHOR
|
49
|
-
|
50
|
-
Brian Aker, E<lt>brian@tangent.orgE<gt>
|
51
|
-
|
52
|
-
=head1 SEE ALSO
|
53
|
-
|
54
|
-
memcached(1) libmemcached(3) memcached_behavior_set(3)
|
55
|
-
|
56
|
-
=cut
|
57
|
-
|
@@ -1,161 +0,0 @@
|
|
1
|
-
=head1 NAME
|
2
|
-
|
3
|
-
memcached_get, memcached_get_len, memcached_mget, memcached_mget_len, memcached_fetch - Get a value
|
4
|
-
|
5
|
-
=head1 LIBRARY
|
6
|
-
|
7
|
-
C Client Library for memcached (libmemcached, -lmemcached)
|
8
|
-
|
9
|
-
=head1 SYNOPSIS
|
10
|
-
|
11
|
-
#include <memcached.h>
|
12
|
-
|
13
|
-
memcached_result_st *
|
14
|
-
memcached_fetch_result(memcached_st *ptr,
|
15
|
-
memcached_result_st *result,
|
16
|
-
memcached_return *error);
|
17
|
-
|
18
|
-
char *memcached_get(memcached_st *ptr,
|
19
|
-
const char *key, size_t key_length,
|
20
|
-
size_t *value_length,
|
21
|
-
uint32_t *flags,
|
22
|
-
memcached_return *error);
|
23
|
-
|
24
|
-
memcached_return
|
25
|
-
memcached_mget(memcached_st *ptr,
|
26
|
-
char **keys, size_t *key_length,
|
27
|
-
size_t number_of_keys);
|
28
|
-
char *
|
29
|
-
memcached_get_by_key(memcached_st *ptr,
|
30
|
-
const char *master_key, size_t master_key_length,
|
31
|
-
const char *key, size_t key_length,
|
32
|
-
uint32_t user_spec_len,
|
33
|
-
size_t *value_length,
|
34
|
-
uint32_t *flags,
|
35
|
-
memcached_return *error);
|
36
|
-
|
37
|
-
memcached_return
|
38
|
-
memcached_mget_by_key(memcached_st *ptr,
|
39
|
-
const char *master_key, size_t master_key_length,
|
40
|
-
char **keys, size_t *key_length,
|
41
|
-
size_t number_of_keys,
|
42
|
-
uint32_t user_spec_len);
|
43
|
-
|
44
|
-
char *memcached_fetch(memcached_st *ptr,
|
45
|
-
char *key, size_t *key_length,
|
46
|
-
size_t *value_length,
|
47
|
-
uint32_t *flags,
|
48
|
-
memcached_return *error);
|
49
|
-
memcached_return
|
50
|
-
memcached_fetch_execute(memcached_st *ptr,
|
51
|
-
memcached_return (*callback[])(memcached_st *ptr, memcached_result_st *result, void *context),
|
52
|
-
void *context,
|
53
|
-
unsigned int number_of_callbacks);
|
54
|
-
|
55
|
-
char *
|
56
|
-
memcached_get_len(memcached_st *ptr,
|
57
|
-
const char *key, size_t key_length,
|
58
|
-
uint32_t user_spec_len,
|
59
|
-
size_t *value_length,
|
60
|
-
uint32_t *flags,
|
61
|
-
memcached_return *error);
|
62
|
-
|
63
|
-
memcached_return
|
64
|
-
memcached_mget_len(memcached_st *ptr,
|
65
|
-
const char **keys, size_t *key_length,
|
66
|
-
size_t number_of_keys, uint32_t user_spec_len);
|
67
|
-
|
68
|
-
=head1 DESCRIPTION
|
69
|
-
|
70
|
-
memcached_get() is used to fetch an individual value from the server. You
|
71
|
-
must pass in a key and its length to fetch the object. You must supply
|
72
|
-
three pointer variables which will give you the state of the returned
|
73
|
-
object. A uint32_t pointer to contain whatever flags you stored with the value,
|
74
|
-
a size_t pointer which will be filled with size of of the object, and a
|
75
|
-
memcached_return pointer to hold any error. The object will be returned
|
76
|
-
upon success and NULL will be returned on failure. Any object returned by
|
77
|
-
memcached_get() must be released by the caller application.
|
78
|
-
|
79
|
-
memcached_get_len() is also used to fetch an individual value from the
|
80
|
-
server. The only difference when compared to memcached_get() is that
|
81
|
-
the server will only send back the first n bytes of the value where n is
|
82
|
-
specified by the user. Note that this command is only available when
|
83
|
-
using the ascii protocol.
|
84
|
-
|
85
|
-
memcached_mget() is used to select multiple keys at once. For multiple key
|
86
|
-
operations it is always faster to use this function. This function always
|
87
|
-
works asynchronously. memcached_fetch() is then used to retrieve any keys
|
88
|
-
found. No error is given on keys that are not found. You must call either
|
89
|
-
memcached_fetch() or memcached_fetch_result() after a successful call to
|
90
|
-
memcached_mget(). You should continue to call these functions until they
|
91
|
-
return NULL (aka no more values). If you need to quit in the middle of a
|
92
|
-
memcached_get() call, execute a memcached_quit(). After you do this, you can
|
93
|
-
issue new queries against the server.
|
94
|
-
|
95
|
-
memcached_mget_len() is also used to select multiple keys at once. The
|
96
|
-
only difference when compared to memcached_mget() is that the server
|
97
|
-
will only send back the first n bytes of each value where n is
|
98
|
-
specified by the user. Note that this command is only available when
|
99
|
-
using the ascii protocol.
|
100
|
-
|
101
|
-
memcached_fetch() is used to fetch an individual value from the server.
|
102
|
-
memcached_mget() or memcached_mget_len() must always be called before
|
103
|
-
using this method. You must pass in a key and its length to fetch the
|
104
|
-
object. You must supply three pointer variables which will give you the
|
105
|
-
state of the returned object. A uint32_t pointer to contain whatever
|
106
|
-
flags you stored with the value, a size_t pointer which will be filled
|
107
|
-
with size of of the object, and a memcached_return pointer to hold any
|
108
|
-
error. The object will be returned upon success and NULL will be returned
|
109
|
-
on failure. MEMCACHD_END is returned by the *error value when all objects
|
110
|
-
that have been found are returned. The final value upon MEMCACHED_END is
|
111
|
-
null. Values returned by memcached_fetch() musted be free'ed by the caller.
|
112
|
-
|
113
|
-
memcached_fetch_result() is used to return a memcached_result_st(3) structure
|
114
|
-
from a memcached server. The result object is forward compatible with changes
|
115
|
-
to the server. For more information please refer to the memcached_result_st(3)
|
116
|
-
help. This function will dynamically allocate a result structure for you
|
117
|
-
if you do not pass one to the function.
|
118
|
-
|
119
|
-
memcached_fetch_execute() is a callback function for result sets. Instead
|
120
|
-
of returning the results to you for processing, it passes each of the
|
121
|
-
result sets to the list of functions you provide. It passes to the function
|
122
|
-
a memcached_st that can be cloned for use in the called function (it can not
|
123
|
-
be used directly). It also passes a result set which does not need to be freed.
|
124
|
-
Finally it passes a "context". This is just a pointer to a memory reference
|
125
|
-
you supply the calling function. Currently only one value is being passed
|
126
|
-
to each function call. In the future there will be an option to allow this
|
127
|
-
to be an array.
|
128
|
-
|
129
|
-
memcached_get_by_key() and memcached_mget_by_key() behave in a similar nature
|
130
|
-
as memcached_get() and memcached_mget(). The difference is that they take
|
131
|
-
a master key that is used for determining which server an object was stored
|
132
|
-
if key partitioning was used for storage.
|
133
|
-
|
134
|
-
All of the above functions are not supported when the C<MEMCACHED_BEHAVIOR_USE_UDP>
|
135
|
-
has been set. Executing any of these functions with this behavior on will result in
|
136
|
-
C<MEMCACHED_NOT_SUPPORTED> being returned or, for those functions which do not return
|
137
|
-
a C<memcached_return>, the error function parameter will be set to
|
138
|
-
C<MEMCACHED_NOT_SUPPORTED>.
|
139
|
-
|
140
|
-
=head1 RETURN
|
141
|
-
|
142
|
-
All objects returned must be freed by the calling application.
|
143
|
-
memcached_get(), memcached_get_len(), and memcached_fetch() will return
|
144
|
-
NULL on error. You must look at the value of error to determine what
|
145
|
-
the actual error was.
|
146
|
-
|
147
|
-
=head1 HOME
|
148
|
-
|
149
|
-
To find out more information please check:
|
150
|
-
L<http://tangent.org/552/libmemcached.html>
|
151
|
-
|
152
|
-
=head1 AUTHOR
|
153
|
-
|
154
|
-
Brian Aker, E<lt>brian@tangent.orgE<gt>
|
155
|
-
|
156
|
-
=head1 SEE ALSO
|
157
|
-
|
158
|
-
memcached(1) libmemcached(3) memcached_strerror(3)
|
159
|
-
|
160
|
-
=cut
|
161
|
-
|