Introduction
Lua scripts in Redis let you run multiple commands together safely and quickly without interruptions.
You want to update several keys in Redis at once without other commands interfering.
You need to perform a calculation or check before changing data in Redis.
You want to reduce the number of round trips between your app and Redis server.
You want to ensure a group of commands run as a single atomic operation.
You want to reuse a small program inside Redis for common tasks.