Skip to content

Commit

Permalink
refactor(hermit): Use single cache namespace (#31052)
Browse files Browse the repository at this point in the history
  • Loading branch information
zharinov committed Aug 27, 2024
1 parent c7026f6 commit 2e48977
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 6 deletions.
8 changes: 4 additions & 4 deletions lib/modules/datasource/hermit/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -43,9 +43,9 @@ export class HermitDatasource extends Datasource {
}

@cache({
namespace: `datasource-hermit-package`,
namespace: `datasource-${HermitDatasource.id}`,
key: ({ registryUrl, packageName }: GetReleasesConfig) =>
`${registryUrl ?? ''}-${packageName}`,
`getReleases:${registryUrl ?? ''}-${packageName}`,
})
async getReleases({
packageName,
Expand Down Expand Up @@ -106,8 +106,8 @@ export class HermitDatasource extends Datasource {
* named index, parses it and returned the parsed JSON result
*/
@cache({
namespace: `datasource-hermit-search-manifest`,
key: (u) => u.toString(),
namespace: `datasource-${HermitDatasource.id}`,
key: (u) => `getHermitSearchManifest:${u.toString()}`,
})
async getHermitSearchManifest(u: URL): Promise<HermitSearchResult[] | null> {
const registryUrl = u.toString();
Expand Down
3 changes: 1 addition & 2 deletions lib/util/cache/package/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -69,8 +69,7 @@ export type PackageCacheNamespace =
| 'datasource-golang-version'
| 'datasource-gradle-version'
| 'datasource-helm'
| 'datasource-hermit-package'
| 'datasource-hermit-search-manifest'
| 'datasource-hermit'
| 'datasource-hex'
| 'datasource-hexpm-bob'
| 'datasource-java-version'
Expand Down

0 comments on commit 2e48977

Please sign in to comment.