Skip to content
Myr

fix(cache): not enabled if `caches` is not defined (#2443)

Before adoption: this commit came in with the history the project adopted, so no landing records it.

* fix(cache): not enabled if `caches` is not defined * denoify

authored by Yusuke Wada · committed by GitHub · parent 13039a9 · Browse files · 3 files+24 added−0 removed
This commit

State

Before adoption: this commit came in with the history the project adopted, so no landing records it.

Diff stats

3 files+24 added−0 removed

  • tests:+14 added−0 removed
  • other:+10 added−0 removed

3 files+24 added−0 removed

modified:deno_dist/middleware/cache/index.ts+5 added
modified:src/middleware/cache/index.test.ts+14 added
modified:src/middleware/cache/index.ts+5 added
4 unmodified lines
5 cacheName: string6 wait?: boolean7 cacheControl?: string8}): MiddlewareHandler => {9 if (!caches) {10 console.log('Cache Middleware is not enabled because caches is not defined.')11 return async (_c, next) => await next()12 }1314 if (options.wait === undefined) {15 options.wait = false16 }17
40 unmodified lines