MEMFLUSH(1)

πŸ’… MEMFLUSH β€” the libmemcached glow-up

okay bestie, so this is memflush, and it lives in the libmemcached-awesome family (the manual is literally MEMFLUSH(1), yes we're fancy). Buckle up πŸŽ€


✨ SYNOPSIS ✨

memflush [options]

Reset a server or list of servers πŸ”₯


🌸 DESCRIPTION 🌸

memflush resets the contents of memcached(1) servers. Here's the link if you wanna go read it yourself: <https://linux.die.net/man/1/memcached> πŸ¦‹

⚠️ Warning: This means that all data in the specified servers will be deleted. Like, gone-gone. Not me nuking your whole cache πŸ’€

πŸ‘‘ OPTIONS πŸ‘‘

  • -h, --help β€” Display help. Your girl's got you 🫢
  • -V, --version β€” Display version. Iconic.
  • -q, --quiet β€” Operate quietly. shhh 🀫
  • -v, --verbose β€” Operate more verbosely. Tell me everything, I'm nosy πŸ’œ
  • -d, --debug β€” See -v|--verbose. Same energy, different flag.
  • -s, --servers <list of servers> β€” Specify the list of servers as hostname[:port][,hostname[:port]...]. Comma-separated, port optional, yes you can list a whole squad 🌈
  • -n, --non-blocking β€” Enable non-blocking operations. No waiting around, periodt.
  • -N, --tcp-nodelay β€” Disable Nagle's algorithm. Immediate vibes only ✨
  • -b, --binary β€” Enable binary protocol. Fancy mode.
  • -B, --buffer β€” Buffer requests. Stockpile those little guys.
  • -u, --username <username> β€” Use username for SASL authentication.
  • -p, --password <password> β€” Use password for SASL authentication. (with -u, obvi, that's the whole point)
  • -e, --expire <expiration> β€” Use expiration seconds (or a UNIX timestamp). Now THIS one needs a whole yap session πŸ‘‡
πŸ“ Note: Using an expiration time (period), all keys, which have not bean updated until expiration will cease to exist. Quoting the memcached protocol documentation β€” <https://github.com/memcached/memcached/blob/master/doc/protocol.txt> β€” it states: Its effect is to invalidate all existing items immediately (by default) or after the expiration specified. After invalidation none of the items will be returned in response to a retrieval command (unless it's stored again under the same key after flush_all has invalidated the items). The most precise definition of what flush_all does is the following: it causes all items whose update time is earlier than the time at which flush_all was set to be executed to be ignored for retrieval purposes. The intent of flush_all with a delay, was that in a setting where you have a pool of memcached servers, and you need to flush all content, you have the option of not resetting all memcached servers at the same time (which could e.g. cause a spike in database load with all clients suddenly needing to recreate content that would otherwise have been found in the memcached daemon).

🌱 ENVIRONMENT 🌱

  • MEMCACHED_SERVERS β€” Specify a list of servers. Yes, the env var girlies get a say too πŸ’–

🧚 NOTES 🧚

PROGRAM PREFIX

The prefix of this program is variable, i.e. it can be configured at build time. lowkey customizable fr fr.

Usually the client programs of libmemcached-awesome are prefixed with mem, like memcat or memcp.

It can be configured, though, to replace the prefix with something else like mc β€” in case of that, the client programs of libmemcached-awesome would be called mccat, mccp, etc. respectively. so cute, a whole rebrand 😭


🌈 SEE ALSO 🌈

memcached(1) <https://linux.die.net/man/1/memcached> β€” libmemcached(3) <https://linux.die.net/man/3/libmemcached>

  • C/C++ Client Library for memcached <>
  • Wiping clean the contents of a server <>

okay pookie that's the whole page, version 1.1, dated Jul 24, 2026, brought to you by libmemcached-awesome πŸ’– go forth and flush responsibly, and remember: flushing is forever βœ¨πŸ‘‘πŸŽ€

πŸ“¦ where this page comes from