mirror of
https://github.com/tiennm99/github-readme-stats.git
synced 2026-09-07 12:17:30 +00:00
feat: add CACHE_SECONDS environment variable (#2266)
* feat: add CACHE_SECONDS environment variable This commit adds the CACHE_SECONDS environment variable. This variable can be used to circumvent our cache clamping values for self hosted Vercel instances. * refactor: apply formatter
This commit is contained in:
@@ -44,6 +44,9 @@ export default async (req, res) => {
|
||||
CONSTANTS.FOUR_HOURS,
|
||||
CONSTANTS.ONE_DAY,
|
||||
);
|
||||
cacheSeconds = process.env.CACHE_SECONDS
|
||||
? parseInt(process.env.CACHE_SECONDS, 10) || cacheSeconds
|
||||
: cacheSeconds;
|
||||
|
||||
/*
|
||||
if star count & fork count is over 1k then we are kFormating the text
|
||||
|
||||
Reference in New Issue
Block a user