From 54af5d485c506dc09093a6318a7ab764e93e6f4f Mon Sep 17 00:00:00 2001 From: Max Korsunov Date: Thu, 13 Feb 2025 19:07:25 +0400 Subject: [PATCH 1/2] fix: remote registry cache --- npm/src/github.ts | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/npm/src/github.ts b/npm/src/github.ts index cc6bac5..75da3d5 100644 --- a/npm/src/github.ts +++ b/npm/src/github.ts @@ -20,17 +20,22 @@ export class GithubFetcher { async fetchRegistry(chainId: ChainId): Promise { const response = await this.typedFetcher( `${REGISTRY_BASE_URL}/chains/${chainId}.json`, + { + cache: 'no-cache', + }, ); return new Registry(response); } async fetchGlobals(): Promise { - const response = await this.typedFetcher(`${REGISTRY_BASE_URL}/globals.json`); + const response = await this.typedFetcher(`${REGISTRY_BASE_URL}/globals.json`, { + cache: 'no-cache', + }); return new RegistryGlobals(response); } - private async typedFetcher(url: string): Promise { - const response = await fetch(url); + private async typedFetcher(url: string, init?: RequestInit): Promise { + const response = await fetch(url, init); if (!response.ok) { throw new Error(`Failed to fetch from: ${url}`); } From 3c6fdff3a3b58c26977182f43ad1d10640805f81 Mon Sep 17 00:00:00 2001 From: Max Korsunov Date: Thu, 13 Feb 2025 19:08:47 +0400 Subject: [PATCH 2/2] chore: changeset --- npm/.changeset/eleven-games-film.md | 5 +++++ 1 file changed, 5 insertions(+) create mode 100644 npm/.changeset/eleven-games-film.md diff --git a/npm/.changeset/eleven-games-film.md b/npm/.changeset/eleven-games-film.md new file mode 100644 index 0000000..f648c63 --- /dev/null +++ b/npm/.changeset/eleven-games-film.md @@ -0,0 +1,5 @@ +--- +'@penumbra-labs/registry': patch +--- + +Fix cache revalidation