Skip to content

Commit 6cb9b0a

Browse files
authored
Merge pull request #167 from sametcodes/develop
config: update cache time of queries
2 parents ec70469 + 3df021a commit 6cb9b0a

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

middlewares/api/cache.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ export const setCacheControl = (
88
const {
99
query: { cache_time },
1010
} = res.locals;
11-
const cacheValue = `public, max-age=60, s-maxage=${cache_time}, stale-while-revalidate=86400`;
11+
const cacheValue = `public, max-age=180, s-maxage=${cache_time}, stale-while-revalidate=86400`;
1212
res.setHeader("Cache-Control", cacheValue);
1313

1414
if (req.query._vercel_no_cache && req.query._vercel_no_cache === "1") {

platforms/github/query/index.ts

+3-3
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ export const getContributionsSummary: QueryService = async (
3232
* @name getRepositoryMilestone
3333
* @title Get repository milestone
3434
* @query_type Private
35-
* @cache_time 60
35+
* @cache_time 3600
3636
* @for_public getPublicRepositoryMilestone
3737
* @description Get the view of a specific milestone with count of issue and PRs for a repository
3838
*/
@@ -76,7 +76,7 @@ export const getRepositoryMilestone: QueryService = async (
7676
* @name getPublicRepositoryMilestone
7777
* @title Get public repository milestone
7878
* @query_type Public
79-
* @cache_time 60
79+
* @cache_time 3600
8080
* @for_secured getRepositoryMilestone
8181
* @description Get the view of a specific milestone with count of issue and PRs for a repository
8282
*/
@@ -128,7 +128,7 @@ export const getPublicRepositoryMilestone: QueryService = async (
128128
* @name getUserActiveSponsorGoal
129129
* @title Get active sponsor goal
130130
* @query_type Public
131-
* @cache_time 3600
131+
* @cache_time 60
132132
* @description Show your active sponsor goal
133133
*/
134134
export const getUserActiveSponsorGoal: QueryService = async (

0 commit comments

Comments
 (0)