valkey icon indicating copy to clipboard operation
valkey copied to clipboard

[NEW] Add caching to COMMAND command to improve performance

Open ebarskiy opened this issue 1 month ago • 1 comments

The problem/use-case that the feature addresses

COMMAND command is slow as it makes too many string operations generic clients like to send it on connection introducing unnecessary lag to the system list of commands rarely changes (via module load/unload operations) making it a good candidate for caching

Description of the feature

Cache command result and invalidate on underling data change (module loads/unloads new command)

Alternatives you've considered

Additional information

two tier caching: per command cache + full COMMAND output

ebarskiy avatar Nov 13 '25 22:11 ebarskiy

https://github.com/valkey-io/valkey/pull/2839

ebarskiy avatar Nov 13 '25 22:11 ebarskiy