FUNCTION-FLUSH(3valkey)

๐Ÿ“ฆ
version 9.0.6 ยท 2 versions
, in fedora 44

๐Ÿ’– FUNCTION-FLUSH โ€” the Valkey glow-up page ๐Ÿ’–

okay bestie, you're reading the manual for FUNCTION-FLUSH(3valkey), straight out of the Valkey Command Manual. this is the one that hits the big red button on your functions. let's get into it ๐Ÿซถ


โœจ NAME โœจ

function-flush โ€” deletes all libraries and functions. all of them. every single one. the whole collection. ๐Ÿ’…


๐ŸŒธ SYNOPSIS ๐ŸŒธ

FUNCTION FLUSH [ASYNC | SYNC]

๐Ÿฆ‹ DESCRIPTION ๐Ÿฆ‹

so basically: this nukes all the libraries. gone. poof. โœจ

unless you pass the optional mode argument, the lazyfree-lazy-user-flush configuration directive is the one calling the shots and decides what actually happens. the valid modes are:

  • ASYNC โ€” flush the libraries asynchronously. it's giving "yeah I'll get to it" ๐Ÿซง
  • SYNC โ€” flush the libraries synchronously. it's giving "no, we do it right now, together" ๐Ÿ”ฅ

want the full lore? go read valkey-functions-intro(7), Introduction to Valkey Functions. it's the prequel, iykyk ๐Ÿ“–


๐Ÿ’Œ REPLY ๐Ÿ’Œ

per valkey-protocol(7), you get a Simple string reply: OK.

that's it. that's the reply. short, sweet, iconic. ๐Ÿ‘‘


๐ŸŽ€ COMPLEXITY ๐ŸŽ€

O(N) where N is the number of functions deleted.

so yeah, the more functions you're deleting, the longer it takes. math is math. ๐Ÿงฎ


๐ŸŒˆ ACL CATEGORIES ๐ŸŒˆ

  • @scripting
  • @slow
  • @write

โญ HISTORY โญ

  • Available since: 7.0.0

๐Ÿ‘‘ SEE ALSO ๐Ÿ‘‘


and that's the whole page, bestie ๐Ÿ’œ this one's from Valkey 9.0.0, dated 2025-10-21, filed under FUNCTION-FLUSH(3valkey) โ€” go forth and flush responsibly, mwah ๐ŸŽ€โœจ

๐Ÿ“ฆ where this page comes from