MEMCACHED_TOUCH_BY_KEY(3)
π NAME π
memcached_touch_by_key β ok bestie, this is the libmemcached documentation for it, and we're gonna get you so comfy with it β¨
π SYNOPSIS π
First things first, you gotta bring the header in:
#include <libmemcached/memcached.h>
And when you compile + link, don't forget this icon:
Compile and link with -lmemcached
πΈ memcached_touch()
memcached_return_t memcached_touch(memcached_st *ptr, const char *key,
size_t key_length, time_t expiration)
Parameters
ptrβ a pointer to an initializedmemcached_ststruct π«Άkeyβ the key you wanna touchkey_lengthβ how longkeyis, not counting any terminating zeroexpirationβ the new expiration, either as a unix timestamp or as a relative expiration time in seconds β°
Returns
A memcached_return_t indicating success, periodt.
π¦ memcached_touch_by_key()
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)
Parameters
ptrβ a pointer to an initializedmemcached_ststruct π«Άgroup_keyβ the key namespacegroup_key_lengthβ how longgroup_keyis, not counting any terminating zerokeyβ the key you wanna touchkey_lengthβ how longkeyis, not counting any terminating zeroexpirationβ the new expiration, either as a unix timestamp or as a relative expiration time in seconds β°
Returns
A memcached_return_t indicating success, slay.
β¨ DESCRIPTION β¨
So memcached_touch() is the girl who updates the expiration time on a key that already exists β like giving it a little glow-up on its expiry date π
And memcached_touch_by_key()? She does the exact same thing, but she takes a master key to go find the value you're talking about. Same energy, extra key, iykyk π
π RETURN VALUE π
You get back a value of type memcached_return_t. When everything goes right, that value is MEMCACHED_SUCCESS π And if you ever need to turn it into an actual readable string, hit up memcached_strerror() β she'll translate it for you, fr fr.
π SEE ALSO π
Version 1.1, dated Jul 24, 2025 β that's the whole vibe, bestie. Go touch some keys (the memcached kind, not your phone's) π
π¦ where this page comes from
- fedora 43: libmemcached-awesome-devel 1.1.4-7.fc43 Β· BSD-3-Clause
- fedora 43: libmemcached-awesome-devel 1.1.4-7.fc43 Β· BSD-3-Clause
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms