nest-modules / ioredis

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

Timer #264

Closed Quocdat1205 closed 11 months ago

Quocdat1205 commented 1 year ago

How can i set time for key?

juandav commented 11 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