redis-hmsetex
hmsetex lua command for redis clients
DEPRECATED
Since Redis 4.0.0, hset
has become variadic, so use it instead
hmsetex redis command
Sets the value of a hash key and updates the expire date at the same time.
HMSETEX key 1 firstname walter lastname white
In the example above, key key
expires in 1 second.
Install
$ npm install --save redis-hmsetex
Usage
The easiest usecase is to use with https://github.com/luin/ioredis as follows:
const Redis = ;const redis = ;;
Additionally, the necessary information is exported:
const Redis = ;const name lua numberOfKeys = ;const redis = ;redis;
Then, just run like any other command:
redis;; // At this point, null is returned
Tests
There are unit tests and integration tests. Needs Node 6+ to run. The integration tests require redis to be installed.
npm test:unitnpm test:integrationnpm test # run both tests
License
See the LICENSE file for license rights and limitations (MIT).