MEMCACHED_CALLBACK_SET(3) | libmemcached-awesome | MEMCACHED_CALLBACK_SET(3) |
memcached_callback_set - libmemcached Documentation
Its signature is:
Its signature is:
The prefix key is only applied to the primary key, not the master key. MEMCACHED_FAILURE will be returned if no key is set. In the case of a key which is too long, MEMCACHED_BAD_KEY_PROVIDED will be returned.
If you set a value with the value being NULL then the prefix key is disabled.
You are responsible for populating the result object provided. This result object will then be stored in the server and returned to the calling process.
You must clone the memcached_st in order to make use of it. The value will be stored only if you return MEMCACHED_SUCCESS or MEMCACHED_BUFFERED. Returning MEMCACHED_BUFFERED will cause the object to be buffered and not sent immediately (if this is the default behavior based on your connection setup this will happen automatically).
The prototype for this is:
The prototype for this is:
libmemcached can have callbacks set key execution points. These either provide function calls at points in the code, or return pointers to structures for particular usages.
memcached_callback_get() takes a callback flag and returns the structure or function set by memcached_callback_set().
memcached_callback_set() changes the function/structure assigned by a callback flag. No connections are reset.
You can use MEMCACHED_CALLBACK_USER_DATA to provide custom context if required for any of the callbacks.
memcached_callback_get() returns the function or structure that was provided. Upon error, nothing is set, NULL is returned, and the memcached_return_t argument is set to MEMCACHED_FAILURE.
memcached_callback_set() returns MEMCACHED_SUCCESS upon successful setting, otherwise MEMCACHED_FAILURE on error.
March 6, 2023 | 1.1 |