Skip to content

Commit 0f4e14b

Browse files
1-hour cache
1 parent 42a9dd9 commit 0f4e14b

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

src/apis/apis.service.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ export class APIService {
3131

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

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

@@ -102,7 +102,7 @@ export class APIService {
102102
longest: longest_streak
103103
}
104104

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

@@ -119,7 +119,7 @@ export class APIService {
119119
return null;
120120
}
121121

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

@@ -136,7 +136,7 @@ export class APIService {
136136
return null;
137137
}
138138

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

0 commit comments

Comments
 (0)