50
53
retrieved from inside of memcached_fetch_execute(). Cloning a memcached_st
51
54
will copy the pointer to the clone.
53
=item MEMCACHED_CALLBACK_MALLOC_FUNCTION,
56
=item MEMCACHED_CALLBACK_MALLOC_FUNCTION
55
58
This alllows yout to pass in a customized version of malloc that will be used instead of the builtin malloc(3) call.
56
59
The prototype for this is:
58
61
void *(*memcached_malloc_function)(memcached_st *ptr, const size_t size);
60
You can use MEMCACHED_CALLBACK_USER_DATA to provide custom context if required for malloc.
62
=item MEMCACHED_CALLBACK_REALLOC_FUNCTION,
63
=item MEMCACHED_CALLBACK_REALLOC_FUNCTION
64
65
This alllows yout to pass in a customized version of realloc that will be used instead of the builtin realloc(3) call.
65
66
The prototype for this is:
67
68
void *(*memcached_realloc_function)(memcached_st *ptr, void *mem, const size_t size);
69
You can use MEMCACHED_CALLBACK_USER_DATA to provide custom context if required for realloc.
71
=item MEMCACHED_CALLBACK_FREE_FUNCTION,
70
=item MEMCACHED_CALLBACK_FREE_FUNCTION
73
72
This alllows yout to pass in a customized version of realloc that will be used instead of the builtin free(3) call.
74
73
The prototype for this is:
76
75
typedef void (*memcached_free_function)(memcached_st *ptr, void *mem);
78
You can use MEMCACHED_CALLBACK_USER_DATA to provide custom context if required for realloc.
77
=item MEMCACHED_CALLBACK_GET_FAILURE
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).
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);
89
=item MEMCACHED_CALLBACK_DELETE_TRIGGER
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.
94
The prototype for this is:
95
typedef memcached_return (*memcached_trigger_delete_key)(memcached_st *ptr, char *key, size_t key_length);