Skip to content

Commit

Permalink
set a longer cacheLength on [librariesio] badges
Browse files Browse the repository at this point in the history
  • Loading branch information
chris48s committed Mar 6, 2022
1 parent 2cf3591 commit 9e35f59
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 0 deletions.
4 changes: 4 additions & 0 deletions services/librariesio/librariesio-dependencies.service.js
Original file line number Diff line number Diff line change
Expand Up @@ -81,6 +81,8 @@ class LibrariesIoProjectDependencies extends LibrariesIoBase {
},
]

static _cacheLength = 900

async handle({ platform, scope, packageName, version = 'latest' }) {
const url = `/${encodeURIComponent(platform)}/${
scope ? encodeURIComponent(`${scope}/`) : ''
Expand Down Expand Up @@ -116,6 +118,8 @@ class LibrariesIoRepoDependencies extends LibrariesIoBase {
},
]

static _cacheLength = 900

async handle({ user, repo }) {
const url = `/github/${encodeURIComponent(user)}/${encodeURIComponent(
repo
Expand Down
2 changes: 2 additions & 0 deletions services/librariesio/librariesio-dependent-repos.service.js
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,8 @@ export default class LibrariesIoDependentRepos extends LibrariesIoBase {
},
]

static _cacheLength = 900

static defaultBadgeData = {
label: 'dependent repos',
}
Expand Down
2 changes: 2 additions & 0 deletions services/librariesio/librariesio-dependents.service.js
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,8 @@ export default class LibrariesIoDependents extends LibrariesIoBase {
},
]

static _cacheLength = 900

static defaultBadgeData = {
label: 'dependents',
}
Expand Down

0 comments on commit 9e35f59

Please sign in to comment.