Replace SET NX GET in rueidisaside with Lua when using Redis < 7
Currently, rueidisaside uses the latest syntax SET NX GET to acquire a lock before populating values to be cached.
https://github.com/redis/rueidis/blob/0124d4a3cc7c3a8d5f61aa6033481e160fd37f10/rueidisaside/aside.go#L141
The latest syntax is the cause that makes rueidisaside support only Redis >= 7. It would be nice if we had an option to config rueidisaside to use a Lua script instead of the SET NX GET, so that we could support more users with old Redis.
Made the changes ✅
Hi @JayChavan-23, thanks! But please make it another pull request.
Hi @JayChavan-23, thanks! But please make it another pull request.
I will raise one PR for issue #554, and then a second PR for this particular issue after the first one is merged.
Hi @JayChavan-23, thanks! But please make it another pull request.
Raised first one, please check. Thank you.
Working on this with @JayChavan-23
I think this can be closed now @rueian