1 Storing custom information in the client
2 ========================================
7 #include <libmemcached/memcached.h>
8 Compile and link with -lmemcached
10 .. function:: void *memcached_get_user_data (memcached_st *ptr)
12 :param ptr: pointer to initialized `memcached_st` struct
13 :returns: opaque pointer to the user supplied data
15 .. function:: void *memcached_set_user_data (memcached_st *ptr, void *data)
17 :param ptr: pointer to initialized `memcached_st` struct
18 :param data: opaque pointer to user supplied data
19 :returns: opaque pointer to the previously set `data`
24 `libmemcached` allows you to store a pointer to a user specific data inside
25 the memcached_st structure.
27 :func:`memcached_set_user_data` is used to set the user specific data in the
28 :type:`memcached_st` structure.
30 :func:`memcached_get_user_data` is used to retrieve the user specific data in
31 the :type:`memcached_st` structure.
36 :func:`memcached_set_user_data` returns the previous value of the user specific data.
38 :func:`memcached_get_user_data` returns the current value of the user specific data.
45 :manpage:`memcached(1)`
46 :manpage:`libmemcached(3)`
50 * :manpage:`memcached(1)`
51 * :doc:`../libmemcached`