MEMFLUSH(1)

πŸ’… MEMFLUSH(1) πŸ’…

okay so bestie, welcome to memflush from libmemcached-awesome β€” the manual page for the β€œnuke it and start fresh” command. it’s giving reset button energy, and yes, it’s iconic, but also please read the warning. πŸ’€

✨ NAME ✨

memflush β€” libmemcached Documentation. that’s the whole name section, bestie: this is the libmemcached-awesome page for memflush. πŸ’–

πŸ› οΈ SYNOPSIS πŸ› οΈ

memflush [options]

Reset a server or list of servers

πŸ’– DESCRIPTION πŸ’–

memflush resets the contents of memcached(1) servers.

WARNING: This means that all data in the specified servers will be deleted.

like… all of it. gone. no cap. so do a little vibe check before you run this, okay? 🫢

✨ OPTIONS ✨

  • -h, --help β€” Display help. your little β€œwhat does this do again?” lifeline πŸŽ€
  • -V, --version β€” Display version. cute for checking what you’re working with ✨
  • -q, --quiet β€” Operate quietly. less yapping, more doing 🀫
  • -v, --verbose β€” Operate more verbosely. give me all the lore, bestie πŸ”
  • -d, --debug β€” See -v/--verbose. same energy, literally πŸͺž
  • -s, --servers <list of servers> β€” Specify the list of servers as hostname[:port][,hostname[:port]...]. this is where you tell it which servers are catching the reset πŸ’…
  • -n, --non-blocking β€” Enable non-blocking operations.
  • -N, --tcp-nodelay β€” Disable Nagle’s algorithm.
  • -b, --binary β€” Enable binary protocol.
  • -B, --buffer β€” Buffer requests.
  • -u, --username <username> β€” Use username for SASL authentication.
  • -p, --password <password> β€” Use password for SASL authentication.
  • -e, --expire <expiration> β€” Use expiration seconds (or a UNIX timestamp).
NOTE: Using an expiration time (period), all keys, which have not bean updated until expiration will cease to exist.

and yes, β€œbean” is right there in the original β€” I’m not fixing the doc’s typo, I’m just delivering the content, bestie πŸ’€

Quoting the memcached protocol documentation, 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).

so yeah β€” delayed reset is a whole strategy, not just chaos. iykyk 🌸

🌈 ENVIRONMENT 🌈

  • MEMCACHED_SERVERS β€” Specify a list of servers.

🏷️ NOTES 🏷️

πŸŽ€ PROGRAM PREFIX πŸŽ€

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

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 if you see mc-something instead of mem-something, don’t panic β€” that’s just the build-time glow-up. ✨

πŸ‘€ SEE ALSO πŸ‘€

memcached(1) libmemcached(3)

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

xoxo, your libmemcached-awesome bestie πŸ’– β€” this page is rockin’ version 1.1, dated Jul 18, 2024. periodt. πŸ’…

πŸ“¦ where this page comes from