diff --git a/lib/modules/datasource/deno/index.ts b/lib/modules/datasource/deno/index.ts index e396c3b7d8a8b4..e9ca1cca0527e2 100644 --- a/lib/modules/datasource/deno/index.ts +++ b/lib/modules/datasource/deno/index.ts @@ -37,7 +37,7 @@ export class DenoDatasource extends Datasource { namespace: `datasource-${DenoDatasource.id}`, key: ({ packageName, registryUrl }: GetReleasesConfig) => // TODO: types (#22198) - `${registryUrl}:${packageName}`, + `getReleases:${registryUrl}:${packageName}`, }) async getReleases({ packageName, @@ -70,14 +70,15 @@ export class DenoDatasource extends Datasource { } @cache({ - namespace: `datasource-${DenoDatasource.id}-versions`, - key: (moduleAPIURL) => moduleAPIURL, + namespace: `datasource-${DenoDatasource.id}`, + key: (moduleAPIURL) => `getReleaseResult:${moduleAPIURL}`, }) async getReleaseResult(moduleAPIURL: string): Promise { + const detailsCacheKey = `details:${moduleAPIURL}`; const releasesCache: Record = (await packageCache.get( - `datasource-${DenoDatasource.id}-details`, - moduleAPIURL, + `datasource-${DenoDatasource.id}`, + detailsCacheKey, )) ?? {}; let cacheModified = false; @@ -119,8 +120,8 @@ export class DenoDatasource extends Datasource { if (cacheModified) { // 1 week. Releases at Deno are immutable, therefore we can use a long term cache here. await packageCache.set( - `datasource-${DenoDatasource.id}-details`, - moduleAPIURL, + `datasource-${DenoDatasource.id}`, + detailsCacheKey, releasesCache, 10080, ); diff --git a/lib/util/cache/package/types.ts b/lib/util/cache/package/types.ts index b7580902f61508..cd0496d867e334 100644 --- a/lib/util/cache/package/types.ts +++ b/lib/util/cache/package/types.ts @@ -41,8 +41,6 @@ export type PackageCacheNamespace = | 'datasource-cpan' | 'datasource-crate-metadata' | 'datasource-crate' - | 'datasource-deno-details' - | 'datasource-deno-versions' | 'datasource-deno' | 'datasource-docker-architecture' | 'datasource-docker-hub-cache'