miniredis icon indicating copy to clipboard operation
miniredis copied to clipboard

Support `FUNCTION` commands

Open pje opened this issue 9 months ago • 2 comments

(Creating an issue so we have this captured)

With Redis 7 we have Redis Functions, which support these commands:

  • FCALL
  • FCALL_RO
  • FUNCTION DELETE
  • FUNCTION DUMP
  • FUNCTION FLUSH
  • FUNCTION KILL
  • FUNCTION LIST
  • FUNCTION LOAD
  • FUNCTION RESTORE
  • FUNCTION STATS

Are there any plans to support these commands or document them as unsupported?

Thanks for your work on miniredis! 🙇

pje avatar Mar 06 '25 23:03 pje

hi,

thanks for your issue. I don't have any immediate plans to add them. I know they were added before Redis changed their license, so we could support the state they are in in 7.2.4, but I'm not sure how valuable that is. But I personally don't have plans to add them on the short term.

alicebob avatar Mar 12 '25 08:03 alicebob

Thanks for the response and for adding a note in the readme!

we could support the state they are in in 7.2.4, but I'm not sure how valuable that is.

For what it's worth, 7.2 is the latest version currently supported by Azure Enterprise Cache For Redis, so it's valuable for anyone who depends on that service (including my team!)

Also the Redis docs pretty clearly describe functions as "superseding" EVAL, so moving forward developers who need Lua scripting would be fair to assume they should reach for FUNCTIONs instead of EVAL.

But I personally don't have plans to add them on the short term.

That's understandable—I may be able to get a patch together depending on my own available time, let me see what I can do. 👍

pje avatar Mar 14 '25 16:03 pje