58
57
memcached_callback_set() changes the function/structure assigned by a
59
58
callback flag. No connections are reset.
61
You can use MEMCACHED_CALLBACK_USER_DATA to provide custom context if required for any
60
You can use MEMCACHED_CALLBACK_USER_DATA to provide custom context if required for any of the callbacks.
65
63
.B MEMCACHED_CALLBACK_CLEANUP_FUNCTION
67
When memcached_delete() is called this function will be excuted. At the
68
point of its execution all connections have been closed.
66
When memcached_delete() is called this function will be excuted. At the point of its execution all connections are closed.
72
69
.B MEMCACHED_CALLBACK_CLONE_FUNCTION
74
72
When memcached_delete() is called this function will be excuted. At the
75
point of its execution all connections have been closed.
73
point of its execution all connections are closed.
79
76
.B MEMCACHED_CALLBACK_PREFIX_KEY
81
79
You can set a value which will be used to create a domain for your keys.
82
The value specified here will be prefixed to each of your keys. The value can not
83
be greater then MEMCACHED_PREFIX_KEY_MAX_SIZE \- 1 and will reduce MEMCACHED_MAX_KEY by
84
the value of your key. The prefix key is only applied to the primary key,
85
not the master key. MEMCACHED_FAILURE will be returned if no key is set. In the case
86
of a key which is too long MEMCACHED_BAD_KEY_PROVIDED will be returned.
80
The value specified here will be prefixed to each of your keys. The value can not be greater then MEMCACHED_PREFIX_KEY_MAX_SIZE \- 1 and will reduce MEMCACHED_MAX_KEY by the value of your key.
82
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.
88
84
If you set a value with the value being NULL then the prefix key is disabled.
92
87
.B MEMCACHED_CALLBACK_USER_DATA
94
90
This allows you to store a pointer to a specifc piece of data. This can be
95
91
retrieved from inside of memcached_fetch_execute(). Cloning a memcached_st
96
92
will copy the pointer to the clone.
100
95
.B MEMCACHED_CALLBACK_MALLOC_FUNCTION
102
98
DEPRECATED: use memcached_set_memory_allocators instead.
106
101
.B MEMCACHED_CALLBACK_REALLOC_FUNCTION
108
104
DEPRECATED: use memcached_set_memory_allocators instead.
112
107
.B MEMCACHED_CALLBACK_FREE_FUNCTION
114
110
DEPRECATED: use memcached_set_memory_allocators instead.
118
113
.B MEMCACHED_CALLBACK_GET_FAILURE
120
116
This function implements the read through cache behavior. On failure of retrieval this callback will be called.
121
You are responsible for populating the result object provided. This result object will then be stored in the server and
122
returned to the calling process. You must clone the memcached_st in order to
118
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.
120
You must clone the memcached_st in order to
123
121
make use of it. The value will be stored only if you return
124
122
MEMCACHED_SUCCESS or MEMCACHED_BUFFERED. Returning MEMCACHED_BUFFERED will
125
123
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).
127
125
The prototype for this is:
128
126
memcached_return_t (*memcached_trigger_key)(memcached_st *ptr, char *key, size_t key_length, memcached_result_st *result);
132
129
.B MEMCACHED_CALLBACK_DELETE_TRIGGER