ioredis-mock
ioredis-mock copied to clipboard
Persist data to disk
For a CLI application that use ioredis, it would be useful to have a way to persist and restore the current ioredis-mock data, so that multiple invocations of the CLI can work with a shared data set. Hypothetical API:
RedisMock.saveDump("file.json")
RedisMock.restoreDump("file.json")
I think I'll go another route with the CLI testing and avoid the child processes, which is both faster and ioredis-mock data can persists for the lifetime of the testing process.
Leaving this open as such save/restore functionality may still be useful for other use cases.