-
-

Storing custom user information in the client.¶

-

Manage user specific data

-
-

LIBRARY¶

-

C Client Library for memcached (libmemcached, -lmemcached)

-
+
+

Storing custom information in the client¶

SYNOPSIS¶

-

#include <libmemcached/memcached.h>

-
+
+
#include <libmemcached/memcached.h>
+
Compile and link with -lmemcached
+
+
-void *memcached_get_user_data(memcached_st *ptr)¶
-
- -
+void *memcached_get_user_data(memcached_st *ptr)¶
+
+++ + + + + + +
Parameters:ptr -- pointer to initialized memcached_st struct
Returns:opaque pointer to the user supplied data
+
+ +
-void *memcached_set_user_data(memcached_st *ptr, void *data)¶
-
+void *memcached_set_user_data(memcached_st *ptr, void *data)¶
+
+++ + + + + + +
Parameters:
    +
  • ptr -- pointer to initialized memcached_st struct
  • +
  • data -- opaque pointer to user supplied data
  • +
+
Returns:

opaque pointer to the previously set data

+
+
-

Compile and link with -lmemcached

DESCRIPTION¶

-

libmemcached(3) allows you to store a pointer to a user specific data inside +

libmemcached allows you to store a pointer to a user specific data inside the memcached_st structure.

memcached_set_user_data() is used to set the user specific data in the memcached_st structure.

-

memcached_get_user_data() is used to retrieve the user specific data in the memcached_st structure.

+

memcached_get_user_data() is used to retrieve the user specific data in +the memcached_st structure.

RETURN VALUE¶

memcached_set_user_data() returns the previous value of the user specific data.

-

memcached_get_user_data() returns the current value uf the user specific data.

+

memcached_get_user_data() returns the current value of the user specific data.

@@ -259,20 +283,11 @@ the memcached_st structure.

- - © Copyright

- - - - Built with Sphinx using a - - theme - - provided by Read the Docs. + Built with Sphinx using a theme provided by Read the Docs. @@ -284,6 +299,7 @@ the memcached_st structure.

+