1 Update expiration on a key
2 ==========================
7 #include <libmemcached/memcached.h>
8 Compile and link with -lmemcached
10 .. function:: memcached_return_t memcached_touch (memcached_st *ptr, const char *key, size_t key_length, time_t expiration)
12 :param ptr: pointer to initialized `memcached_st` struct
13 :param key: the key to touch
14 :param key_length: the length of `key` without any terminating zero
15 :param expiration: new expiration as a unix timestamp or as relative expiration time in seconds
16 :returns: `memcached_return_t` indicating success
18 .. function:: memcached_return_t memcached_touch_by_key (memcached_st *ptr, const char *group_key, size_t group_key_length, const char *key, size_t key_length, time_t expiration)
20 :param ptr: pointer to initialized `memcached_st` struct
21 :param group_key: the `key` namespace
22 :param group_key_length: the length of `group_key` without any terminating zero
23 :param key: the key to touch
24 :param key_length: the length of `key` without any terminating zero
25 :param expiration: new expiration as a unix timestamp or as relative expiration time in seconds
26 :returns: `memcached_return_t` indicating success
31 :func:`memcached_touch` is used to update the expiration time on an existing key.
32 :func:`memcached_touch_by_key` works the same, but it takes a master key
33 to find the given value.
38 A value of type :type:`memcached_return_t` is returned.
39 On success that value will be `MEMCACHED_SUCCESS`.
40 Use :func:`memcached_strerror` to translate this value to a printable
48 :manpage:`memcached(1)`
49 :manpage:`libmemcached(3)`
50 :manpage:`memcached_strerror(3)`
54 * :manpage:`memcached(1)`
55 * :doc:`../libmemcached`
56 * :doc:`memcached_strerror`