E
E
Egor2016-09-03 22:07:08
Redis
Egor, 2016-09-03 22:07:08

What do arguments in ioredis do?

This code is used.

import Redis from 'ioredis';
const cache = new Redis();

cache.set('data', data, 'EX', 3);

I can't find what the 3rd and 4th arguments mean incache.set('data', data, 'EX', 3)

Answer the question

In order to leave comments, you need to log in

1 answer(s)
R
Ro37A, 2016-09-04
@DarkSir

EX - Expire time in seconds. 4th argument is the number of seconds.
Key lifetime after which it will be deleted.
Redis Docks

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question