mirror of
https://github.com/renovatebot/renovate.git
synced 2025-01-12 23:16: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 { cache } from '../../util/cache/package/decorator';
|
||||
import { HttpError } from '../../util/http/types';
|
||||
import { Datasource } from '../datasource';
|
||||
import type { GetReleasesConfig, ReleaseResult } from '../types';
|
||||
|
@ -18,6 +19,10 @@ export class AdoptiumJavaDatasource extends Datasource {
|
|||
|
||||
caching = true;
|
||||
|
||||
@cache({
|
||||
namespace: `datasource-${datasource}`,
|
||||
key: ({ registryUrl }: GetReleasesConfig) => `${registryUrl}`,
|
||||
})
|
||||
async getReleases({
|
||||
registryUrl,
|
||||
}: GetReleasesConfig): Promise<ReleaseResult | null> {
|
||||
|
|
Loading…
Reference in a new issue