41
41
memcached_callback_set() changes the function/structure assigned by a
42
42
callback flag. No connections are reset.
44
You can use MEMCACHED_CALLBACK_USER_DATA to provide custom context if required for any
44
You can use MEMCACHED_CALLBACK_USER_DATA to provide custom context if required for any of the callbacks.
48
47
.. c:var:: MEMCACHED_CALLBACK_CLEANUP_FUNCTION
50
When memcached_delete() is called this function will be excuted. At the
51
point of its execution all connections have been closed.
49
When memcached_delete() is called this function will be excuted. At the point of its execution all connections are closed.
55
53
.. c:var:: MEMCACHED_CALLBACK_CLONE_FUNCTION
57
When memcached_delete() is called this function will be excuted. At the
58
point of its execution all connections have been closed.
55
When memcached_delete() is called this function will be excuted. At the
56
point of its execution all connections are closed.
62
60
.. c:var:: MEMCACHED_CALLBACK_PREFIX_KEY
64
You can set a value which will be used to create a domain for your keys.
65
The value specified here will be prefixed to each of your keys. The value can not
66
be greater then MEMCACHED_PREFIX_KEY_MAX_SIZE - 1 and will reduce MEMCACHED_MAX_KEY by
67
the value of your key. The prefix key is only applied to the primary key,
68
not the master key. MEMCACHED_FAILURE will be returned if no key is set. In the case
69
of a key which is too long MEMCACHED_BAD_KEY_PROVIDED will be returned.
62
You can set a value which will be used to create a domain for your keys.
63
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.
65
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.
71
If you set a value with the value being NULL then the prefix key is disabled.
67
If you set a value with the value being NULL then the prefix key is disabled.
74
70
.. c:var:: MEMCACHED_CALLBACK_USER_DATA
76
This allows you to store a pointer to a specifc piece of data. This can be
77
retrieved from inside of memcached_fetch_execute(). Cloning a memcached_st
78
will copy the pointer to the clone.
72
This allows you to store a pointer to a specifc piece of data. This can be
73
retrieved from inside of memcached_fetch_execute(). Cloning a memcached_st
74
will copy the pointer to the clone.
82
78
.. c:var:: MEMCACHED_CALLBACK_MALLOC_FUNCTION
84
DEPRECATED: use memcached_set_memory_allocators instead.
80
DEPRECATED: use memcached_set_memory_allocators instead.
88
84
.. c:var:: MEMCACHED_CALLBACK_REALLOC_FUNCTION
90
DEPRECATED: use memcached_set_memory_allocators instead.
86
DEPRECATED: use memcached_set_memory_allocators instead.
94
90
.. c:var:: MEMCACHED_CALLBACK_FREE_FUNCTION
96
DEPRECATED: use memcached_set_memory_allocators instead.
92
DEPRECATED: use memcached_set_memory_allocators instead.
100
96
.. c:var:: MEMCACHED_CALLBACK_GET_FAILURE
102
This function implements the read through cache behavior. On failure of retrieval this callback will be called.
103
You are responsible for populating the result object provided. This result object will then be stored in the server and
104
returned to the calling process. You must clone the memcached_st in order to
105
make use of it. The value will be stored only if you return
106
MEMCACHED_SUCCESS or MEMCACHED_BUFFERED. Returning MEMCACHED_BUFFERED will
107
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).
98
This function implements the read through cache behavior. On failure of retrieval this callback will be called.
100
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.
102
You must clone the memcached_st in order to
103
make use of it. The value will be stored only if you return
104
MEMCACHED_SUCCESS or MEMCACHED_BUFFERED. Returning MEMCACHED_BUFFERED will
105
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).
109
The prototype for this is:
110
memcached_return_t (\*memcached_trigger_key)(memcached_st \*ptr, char \*key, size_t key_length, memcached_result_st \*result);
107
The prototype for this is:
108
memcached_return_t (\*memcached_trigger_key)(memcached_st \*ptr, char \*key, size_t key_length, memcached_result_st \*result);