Skip to content

Commit a83de60

Browse files
committed
Remove type casting from parseCacheHeaders
1 parent c538e1d commit a83de60

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/HttpClient/middlewares/cache.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -180,7 +180,7 @@ export const cacheMiddleware = ({ type, storage, asyncSet }: CacheOptions) => {
180180
}
181181

182182
const {data, headers, status} = ctx.response as AxiosResponse
183-
const {age, etag, maxAge: headerMaxAge, noStore, noCache} = parseCacheHeaders(headers as any)
183+
const {age, etag, maxAge: headerMaxAge, noStore, noCache} = parseCacheHeaders(headers)
184184

185185
const {forceMaxAge} = ctx.config
186186
const maxAge = forceMaxAge && cacheableStatusCodes.includes(status) ? Math.max(forceMaxAge, headerMaxAge) : headerMaxAge

0 commit comments

Comments
 (0)