MEMCACHED_EXIST(3)
π MEMCACHED_EXIST β libmemcached-awesome π
okay bestie, welcome to MEMCACHED_EXIST(3), straight outta the libmemcached-awesome manual set π this is the one where you're just peeking β "hey does this key even exist??" β no reads, no writes, just a lil vibe check on your cache β¨
πΈ NAME πΈ
memcached_exist β libmemcached Documentation π
β¨ SYNOPSIS β¨
like, literally just pull it in:
#include <libmemcached/memcached.h>
and bestie you have to compile and link with -lmemcached or she will not show up. no cap. π«Ά
memcached_return_t memcached_exist(memcached_st *ptr, char *key, size_t *key_length)
memcached_return_t memcached_exist_by_key(memcached_st *ptr, char *group_key, size_t *group_key_length, char *key, size_t *key_length)
π Parameters
ptrβ pointer to an initializedmemcached_ststruct π (yes it must be initialized, don't be doing nonsense)group_keyβ the key namespace ποΈgroup_key_lengthβ length of thegroup_keywithout any terminating zerokeyβ the key to check πkey_lengthβ length of thekeywithout any terminating zero
π Returns
memcached_return_t indicating success β
π Added in version 0.53. so if you're on something older, she's not there yet, sorry bestie π
π¦ DESCRIPTION π¦
memcached_exist() can be used to check if a key exists. that's it, that's the whole thing π
it's giving "am I being ghosted or is this key actually real" energy. use it, love it, periodt.
π RETURN VALUE π
MEMCACHED_SUCCESSβ The key exists. π she's alive!! iconic!!MEMCACHED_NOTFOUNDβ The key was not found. π not me getting left on read by the cache
π SEE ALSO π
memcached(1) libmemcached(3) memcached_strerror(3) β go read those too, iykyk π§
version 1.1, dated Jul 24, 2025 β that's the libmemcached-awesome glow-up, and honestly? she ate. mwah π bye bestie, go check some keys π¦β¨
π¦ 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