nest-modules / ioredis

:see_no_evil: :hear_no_evil: :speak_no_evil: A ioredis module for Nest framework (node.js)
MIT License
142 stars 30 forks source link

Timer #264

Closed Quocdat1205 closed 9 months ago

Quocdat1205 commented 1 year ago

How can i set time for key?

juandav commented 9 months ago
this.redis.set('key', 'Redis data!');
this.redis.expire("key", 10); // 10 seconds
this.redis.ttl("key"); // a number smaller or equal to 10