Skip to content
Snippets Groups Projects
Unverified Commit 464b18ba authored by Michael Kriese's avatar Michael Kriese Committed by GitHub
Browse files

fix(datasource:adoptium-java): add caching (#11110)

parent ef069c46
No related branches found
Tags 32.154.7
No related merge requests found
import { ExternalHostError } from '../../types/errors/external-host-error'; import { ExternalHostError } from '../../types/errors/external-host-error';
import { cache } from '../../util/cache/package/decorator';
import { HttpError } from '../../util/http/types'; import { HttpError } from '../../util/http/types';
import { Datasource } from '../datasource'; import { Datasource } from '../datasource';
import type { GetReleasesConfig, ReleaseResult } from '../types'; import type { GetReleasesConfig, ReleaseResult } from '../types';
...@@ -18,6 +19,10 @@ export class AdoptiumJavaDatasource extends Datasource { ...@@ -18,6 +19,10 @@ export class AdoptiumJavaDatasource extends Datasource {
caching = true; caching = true;
@cache({
namespace: `datasource-${datasource}`,
key: ({ registryUrl }: GetReleasesConfig) => `${registryUrl}`,
})
async getReleases({ async getReleases({
registryUrl, registryUrl,
}: GetReleasesConfig): Promise<ReleaseResult | null> { }: GetReleasesConfig): Promise<ReleaseResult | null> {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment