Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

cache some badges for longer #9785

Merged
merged 1 commit into from
Dec 6, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions services/bundlephobia/bundlephobia.service.js
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,8 @@ export default class Bundlephobia extends BaseJsonService {
},
]

static _cacheLength = 900

static defaultBadgeData = { label: 'bundlephobia', color: 'informational' }

static render({ format, size }) {
Expand Down
2 changes: 1 addition & 1 deletion services/discord/discord.service.js
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ export default class Discord extends BaseJsonService {
},
}

static _cacheLength = 60
static _cacheLength = 300

static defaultBadgeData = { label: 'chat' }

Expand Down
2 changes: 1 addition & 1 deletion services/opencollective/opencollective-all.service.js
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ export default class OpencollectiveAll extends OpencollectiveBase {
},
}

static _cacheLength = 1800
static _cacheLength = 3600

static defaultBadgeData = {
label: 'backers and sponsors',
Expand Down
2 changes: 1 addition & 1 deletion services/opencollective/opencollective-backers.service.js
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ export default class OpencollectiveBackers extends OpencollectiveBase {
},
}

static _cacheLength = 1800
static _cacheLength = 3600

static defaultBadgeData = {
label: 'backers',
Expand Down
2 changes: 1 addition & 1 deletion services/opencollective/opencollective-sponsors.service.js
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ export default class OpencollectiveSponsors extends OpencollectiveBase {
},
}

static _cacheLength = 1800
static _cacheLength = 3600

static defaultBadgeData = {
label: 'sponsors',
Expand Down
2 changes: 1 addition & 1 deletion services/pypi/pypi-downloads.service.js
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ export default class PypiDownloads extends BaseJsonService {
},
]

static _cacheLength = 21600
static _cacheLength = 28800

static defaultBadgeData = { label: 'downloads' }

Expand Down
Loading