Skip to content

Commit

Permalink
cache some badges for longer (#9785)
Browse files Browse the repository at this point in the history
  • Loading branch information
chris48s authored Dec 6, 2023
1 parent 45bb786 commit 57820b2
Show file tree
Hide file tree
Showing 6 changed files with 7 additions and 5 deletions.
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

0 comments on commit 57820b2

Please sign in to comment.