We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent feb8ceb commit a0d6298Copy full SHA for a0d6298
1 file changed
server/plugins/fetch-cache.ts
@@ -60,16 +60,12 @@ export default defineNitroPlugin(nitroApp => {
60
function createCachedFetch(event: H3Event): CachedFetchFunction {
61
return async <T = unknown>(
62
url: string,
63
- options: {
64
- method?: string
65
- body?: unknown
66
- headers?: Record<string, string>
67
- } = {},
+ options: Parameters<typeof $fetch>[1] = {},
68
ttl: number = FETCH_CACHE_DEFAULT_TTL,
69
): Promise<CachedFetchResult<T>> => {
70
// Check if this URL should be cached
71
if (!isAllowedDomain(url)) {
72
- const data = (await $fetch(url, options as Parameters<typeof $fetch>[1])) as T
+ const data = (await $fetch(url, options)) as T
73
return { data, isStale: false, cachedAt: null }
74
}
75
0 commit comments