X-Git-Url: https://git.m6w6.name/?a=blobdiff_plain;f=docs%2Fsource%2Flibmemcached%2Fmemcached_touch.rst;h=1b0fdb610a651292b5a3e5dfee183f5992c442e3;hb=6e732f43b86a64b49fbb02d2b5da1a1a1152ddb9;hp=1b92e6ef2c7bb1a5f913124c67beef6b5ee7f46e;hpb=28c4d79e109e11d7d2a9f3189de57da28302ec68;p=awesomized%2Flibmemcached diff --git a/docs/source/libmemcached/memcached_touch.rst b/docs/source/libmemcached/memcached_touch.rst index 1b92e6ef..1b0fdb61 100644 --- a/docs/source/libmemcached/memcached_touch.rst +++ b/docs/source/libmemcached/memcached_touch.rst @@ -1,49 +1,56 @@ -=========================================== -memcached_touch, memcached_touch_by_key -=========================================== +Update expiration on a key +========================== -.. index:: object: memcached_st - --------- SYNOPSIS -------- - #include - + Compile and link with -lmemcached + .. function:: memcached_return_t memcached_touch (memcached_st *ptr, const char *key, size_t key_length, time_t expiration) + :param ptr: pointer to initialized `memcached_st` struct + :param key: the key to touch + :param key_length: the length of `key` without any terminating zero + :param expiration: new expiration as a unix timestamp or as relative expiration time in seconds + :returns: `memcached_return_t` indicating success + .. 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) -Compile and link with -lmemcached + :param ptr: pointer to initialized `memcached_st` struct + :param group_key: the `key` namespace + :param group_key_length: the length of `group_key` without any terminating zero + :param key: the key to touch + :param key_length: the length of `key` without any terminating zero + :param expiration: new expiration as a unix timestamp or as relative expiration time in seconds + :returns: `memcached_return_t` indicating success ------------ DESCRIPTION ----------- - :func:`memcached_touch` is used to update the expiration time on an existing key. :func:`memcached_touch_by_key` works the same, but it takes a master key to find the given value. +RETURN VALUE +------------ ------- -RETURN ------- - - -A value of type :type:`memcached_return_t` is returned +A value of type :type:`memcached_return_t` is returned. On success that value will be `MEMCACHED_SUCCESS`. Use :func:`memcached_strerror` to translate this value to a printable string. - - --------- SEE ALSO -------- .. only:: man - :manpage:`memcached(1)` :manpage:`libmemcached(3)` :manpage:`memcached_strerror(3)` + :manpage:`memcached(1)` + :manpage:`libmemcached(3)` + :manpage:`memcached_strerror(3)` + +.. only:: html + * :manpage:`memcached(1)` + * :doc:`../libmemcached` + * :doc:`memcached_strerror`