arunoda/node-redis-scripto — pull request #2 by suprememoocow (2014-05-13 08:02:27+00:00)
Title: Add support for reloading scripts into redis on "NOSCRIPT" errors.

This PR deals with functionality to support Redis Sentinel, but the functionality may be useful in certain circumstances even in non-Redis-Sentinel configurations.

We're currently in the process of migrating to Redis Sentinel. We've selected [Node Redis Sentinel Client](https://github.com/DocuSignDev/node-redis-sentinel-client) as our sentinel client.

Unfortunately we're experiencing NOSCRIPT errors with Redis Scripto when switching Redis server instances.

This PR modifieds Scripto so to attempt to re-evaluate a script (once) on a NOSCRIPT error. This is useful for sentinel configurations, but also potentially for situations in which a SCRIPT FLUSH has occurred on a single Redis instance (although this is probably a rare situation).