Skip to content

Commit

Permalink
refactor(gitlab-tags): Use single cache namespace
Browse files Browse the repository at this point in the history
  • Loading branch information
zharinov committed Aug 26, 2024
1 parent 976a66b commit cd8dc3d
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 4 deletions.
6 changes: 3 additions & 3 deletions lib/modules/datasource/gitlab-tags/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ export class GitlabTagsDatasource extends Datasource {
@cache({
namespace: `datasource-${GitlabTagsDatasource.id}`,
key: ({ registryUrl, packageName }: GetReleasesConfig) =>
`${getDepHost(registryUrl)}:${packageName}`,
`getReleases:${getDepHost(registryUrl)}:${packageName}`,
})
async getReleases({
registryUrl,
Expand Down Expand Up @@ -72,9 +72,9 @@ export class GitlabTagsDatasource extends Datasource {
* Returs the latest commit hash of the repository.
*/
@cache({
namespace: `datasource-${GitlabTagsDatasource.id}-commit`,
namespace: `datasource-${GitlabTagsDatasource.id}`,
key: ({ registryUrl, packageName }: GetReleasesConfig) =>
`${getDepHost(registryUrl)}:${packageName}`,
`getDigest:${getDepHost(registryUrl)}:${packageName}`,
})
override async getDigest(
{ packageName: repo, registryUrl }: Partial<DigestConfig>,
Expand Down
1 change: 0 additions & 1 deletion lib/util/cache/package/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,6 @@ export type PackageCacheNamespace =
| 'datasource-github-release-attachments'
| 'datasource-gitlab-packages'
| 'datasource-gitlab-releases'
| 'datasource-gitlab-tags-commit'
| 'datasource-gitlab-tags'
| 'datasource-glasskube-packages'
| 'datasource-go-direct'
Expand Down

0 comments on commit cd8dc3d

Please sign in to comment.