Increased cache expiry

This commit is contained in:
Filip Znachor 2024-09-17 09:52:00 +02:00
parent 35d388f776
commit 9ea0624022

2
src/cache/redis.ts vendored
View file

@ -23,7 +23,7 @@ export default class RedisCache implements Cache {
return this.client; return this.client;
} }
public async save(key: string, data: any, ttl: number = 30*60) { public async save(key: string, data: any, ttl: number = 7*24*60*60) {
let redis = await this.getClient(); let redis = await this.getClient();
await redis.set(key, JSON.stringify(data)); await redis.set(key, JSON.stringify(data));
await redis.expire(key, ttl); await redis.expire(key, ttl);