Memcac...ed_dump(3pm)

πŸ¦‹ NAME πŸ¦‹

memcached_dump β€” bestie, this is the one that gets you a lil list of all the keys chillin' on your memcached servers πŸ’…


πŸŽ€ LIBRARY πŸŽ€

It lives in the C Client Library for memcached (libmemcached, -lmemcached). So like, C-coded, C-coded, no cap πŸ’–


✨ SYNOPSIS ✨

Ok so here's the whole vibe, copy it exactly, don't be weird about it:

#include <memcached.h>

memcached_return_t
  memcached_dump (memcached_st *ptr,
                  memcached_dump_fn *function,
                  void *context,
                  uint32_t number_of_callbacks);

typedef memcached_return_t (*memcached_dump_fn)(memcached_st *ptr,
                                                const char *key,
                                                size_t key_length,
                                                void *context);

That typedef?? That's the callback shape. That's giving main character energy fr fr πŸ‘‘


🌸 DESCRIPTION 🌸

So memcached_dump() gets you a list of keys that are vibing on memcached(1) servers. Cute, right?? πŸ₯°

BUT. And this is the important part, so listen: memcached(1) does not guarantee it's gonna dump all the keys. So you absolutely cannot assume you've fetched every single key from the server. It's not a full backup, bestie, it's a peek πŸ”πŸ’€

The way it works: you hand it an array of callbacks, and it runs them on keys as it finds them. Like a lil conveyor belt of keys and your functions are just standing there grabbing them πŸ“

Currently the binary protocol is not supported. So like. If that's your whole plan, it's not giving. πŸ™ˆ

πŸ’– RETURN πŸ’–

You get back a value of type memcached_return_t. On success that value is MEMCACHED_SUCCESS ✨ (slay). And if you wanna know what any of these values actually mean in human words, hit up memcached_strerror() to translate it to a printable string 🫢


🌈 HOME 🌈

Wanna find out more info? Go here, ily:

<https://launchpad.net/libmemcached>


πŸ‘‘ AUTHOR πŸ‘‘

Brian Aker, <brian@tangent.org> β€” king behavior, we stan 🌟


πŸ”₯ SEE ALSO πŸ”₯


And that's the whole page, bestie πŸ’œ This one's from the User Contributed Perl Documentation, filed under memcached_dump(3pm), perl v5.42.3, dated 2026-08-19. Go dump some keys, but remember β€” it's not a full set, and that's on purpose. periodt πŸŽ€βœ¨

πŸ“¦ where this page comes from