MEMCACHED_DELETE(3)
π MEMCACHED_DELETE β the libmemcached delete era π
okay bestie, so this is a page straight out of libmemcached-awesome and it's literally called MEMCACHED_DELETE(3). we're deleting keys. that's the whole vibe. let's go π¦
β¨ NAME β¨
memcached_delete β libmemcached Documentation
no cap, that's the name and that's the job: making keys poof π
π SYNOPSIS π
#include <libmemcached/memcached.h>
Compile and link with -lmemcached
memcached_return_t memcached_delete(memcached_st *ptr, const char *key,
size_t key_length, time_t expiration)
memcached_return_t memcached_delete_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β pointer to an initializedmemcached_ststruct. like, she has to be ready, okay? no uninitialized chaos π«Άgroup_keyβ the key namespace. her little friend group πgroup_key_lengthβ length of thegroup_key, and btw that's without any terminating zero. don't count the null, she's not invited.keyβ the key to delete. the main character we're sending away πkey_lengthβ the length of the key without any terminating zero. (the original page says "the length og the key" β typos are iconic, we keep the facts, we just giggle π)expirationβ obsolete sincememcached(1)version 1.4. yeah. she's retired. still in the signature though, so we respect her π
β Returns β
memcached_return_t indicating success.
π DESCRIPTION π
memcached_delete() is used to delete a particular key. that's it, that's the mission. gone. deleted. not me being emotional about it π
memcached_delete_by_key() works the same, but it takes a master key to find the given value. so like, she uses the group to locate the friend π§
now the tea about expiration, and this part is important so listen up:
Expiration works by placing the item into a delete queue, which means that it won't be possible to retrieve it by the "get" command. The "add" and "replace" commands with this key will also fail (the "set" command will succeed, however). After the time passes, the item is finally deleted from server memory.
so to be clear:"get"nope,"add"nope,"replace"nope, but"set"will succeed. it's giving exclusive access, honestly β¨
Please note the the memcached server removed tests for expiration in the 1.4 version.
π RETURN VALUE π
A value of type memcached_return_t is returned. On success that value will be MEMCACHED_SUCCESS.
Use memcached_strerror() to translate this value to a printable string. she'll tell you what the vibes are π₯
β οΈ real talk: If you are using the non-blocking mode of the library, success only means that the message was queued for delivery. it does NOT mean it's done. it means it's on her way. big difference, bestie, don't get it twisted π
π SEE ALSO π
okay and that's the whole page, we ate π this was libmemcached-awesome version 1.1, dated Jul 24, 2025 β go forth and delete responsibly, bestie, ily πβ¨
π¦ 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