Skip to content

Commit 93e80eb

Browse files
committed
fix: adjust badge api caching strategy
1 parent 8c8f2fa commit 93e80eb

1 file changed

Lines changed: 7 additions & 0 deletions

File tree

nuxt.config.ts

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -88,6 +88,13 @@ export default defineNuxtConfig({
8888
routeRules: {
8989
// API routes
9090
'/api/**': { isr: 60 },
91+
'/api/registry/badge/**': {
92+
isr: {
93+
expiration: 60 * 60 /* one hour */,
94+
passQuery: true,
95+
allowQuery: ['color', 'labelColor', 'label', 'name'],
96+
},
97+
},
9198
'/api/registry/docs/**': { isr: true, cache: { maxAge: 365 * 24 * 60 * 60 } },
9299
'/api/registry/file/**': { isr: true, cache: { maxAge: 365 * 24 * 60 * 60 } },
93100
'/api/registry/provenance/**': { isr: true, cache: { maxAge: 365 * 24 * 60 * 60 } },

0 commit comments

Comments
 (0)