mirror of
https://github.com/renovatebot/renovate.git
synced 2025-01-13 07:26:26 +00:00
fix(datasource:adoptium-java): add caching (#11110)
This commit is contained in:
parent
ef069c469e
commit
464b18bacc
1 changed files with 5 additions and 0 deletions
|
@ -1,4 +1,5 @@
|
||||||
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 {
|
||||||
|
|
||||||
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> {
|
||||||
|
|
Loading…
Reference in a new issue