Migrating Lua scripts

Migrating Lua scripts #

Redict is backwards-compatible with the Lua API used by Redis®1 OSS 7.2.4, and all Lua scripts targetting this version of Redis® will work with Redict without changes.

If you wish to update your Lua scripts to remove references to Redis®, you may simply substitute the “redis” global for “redict”, for instance by changing “redis.call” to “redict.call”.

Warning: Changing “redis” to “redict” in your Lua scripts will change the SHA-1 checksum of your script, which in turn will affect the hash you use with the EVALSHA and EVALSHA_RO commands.

For the complete description of Redict’s Lua API, see Scripting Redict with Lua.


  1. Redis is a registered trademark of Redis Ltd. Any rights therein are reserved to Redis Ltd. Any use by the Redict project is for referential purposes only and does not indicate any sponsorship, endorsement or affiliation between Redis and the Redict project. ↩︎

Redict logo courtesy of @janWilejan, CC-BY-SA-4.0. Download SVG ⤑

Portions of this website courtesy of Salvatore Sanfilippo, CC-BY-SA-4.0.