Skip to content

Commit

Permalink
1-hour cache
Browse files Browse the repository at this point in the history
  • Loading branch information
Andcool-Systems committed Dec 20, 2024
1 parent 42a9dd9 commit 0f4e14b
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/apis/apis.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ export class APIService {

if (response.status !== 200) return null;

await this.cacheManager.set(`repos:${username}`, JSON.stringify(response.data), 1000 * 60 * 60 * 12);
await this.cacheManager.set(`repos:${username}`, JSON.stringify(response.data), 1000 * 60 * 60);
return response.data;
}

Expand Down Expand Up @@ -102,7 +102,7 @@ export class APIService {
longest: longest_streak
}

await this.cacheManager.set(`streak:${username}`, JSON.stringify(result), 1000 * 60 * 60 * 12);
await this.cacheManager.set(`streak:${username}`, JSON.stringify(result), 1000 * 60 * 60);
return result;
}

Expand All @@ -119,7 +119,7 @@ export class APIService {
return null;
}

await this.cacheManager.set(`waka_global:${path}`, JSON.stringify(response.data), 1000 * 60 * 60 * 12);
await this.cacheManager.set(`waka_global:${path}`, JSON.stringify(response.data), 1000 * 60 * 60);
return response.data;
}

Expand All @@ -136,7 +136,7 @@ export class APIService {
return null;
}

await this.cacheManager.set(`waka_langs:${path}`, JSON.stringify(response.data), 1000 * 60 * 60 * 12);
await this.cacheManager.set(`waka_langs:${path}`, JSON.stringify(response.data), 1000 * 60 * 60);
return response.data;
}

Expand Down

0 comments on commit 0f4e14b

Please sign in to comment.