Repository: deno
Issue: deno_cache panics when using `compile`
Labels: bug,feat,compile

# General information

The panic occurs when using the `cache` function of `x/hono@v3.1.6/middleware.ts` and only when using the compile command. When running directly, it seems to be working just fine.

# Rust Backtrace

## using Docker (`denoland/deno:alpine`)

```
============================================================
Deno has panicked. This is a bug in Deno. Please report this
at https://github.com/denoland/deno/issues/new.
If you can reliably reproduce this panic, include the
reproduction steps and re-run with the RUST_BACKTRACE=1 env
var set and include the backtrace in your report.

Platform: linux x86_64
Version: 1.33.0
Args: ["./backend"]
 
thread 'main' panicked at 'required type deno_cache::CreateCache<deno_cache::sqlite::SqliteBackedCache> is not present in GothamState container', /home/runner/work/deno/deno/core/gotham_state.rs:82:3
stack backtrace:
   0: rust_begin_unwind
             at /rustc/9eb3afe9ebe9c7d2b84b71002d44f4a0edac95e0/library/std/src/panicking.rs:575:5
   1: core::panicking::panic_fmt
             at /rustc/9eb3afe9ebe9c7d2b84b71002d44f4a0edac95e0/library/core/src/panicking.rs:64:14
   2: deno_core::gotham_state::missing
   3: deno_cache::get_cache
   4: <futures_util::future::future::Map<Fut,F> as core::future::future::Future>::poll
   5: deno_core::runtime::queue_async_op
   6: deno_cache::op_cache_storage_open::v8_fn_ptr
   7: _ZN2v88internal12_GLOBAL__N_119HandleApiCallHelperILb0EEENS0_11MaybeHandleINS0_6ObjectEEEPNS0_7IsolateENS0_6HandleINS0_10HeapObjectEEENS8_INS0_20FunctionTemplateInfoEEENS8_IS4_EEPmi
             at ./../../../../v8/src/builtins/builtins-api.cc:113:36
   8: _ZN2v88internal21Builtin_HandleApiCallEiPmPNS0_7IsolateE
             at ./../../../../v8/src/builtins/builtins-api.cc:135:1
   9: Builtins_CEntry_Return1_ArgvOnStack_BuiltinExit
note: Some details are omitted, run with `RUST_BACKTRACE=full` for a verbose backtrace.
```

## using macOS

```
============================================================
Deno has panicked. This is a bug in Deno. Please report this
at https://github.com/denoland/deno/issues/new.
If you can reliably reproduce this panic, include the
reproduction steps and re-run with the RUST_BACKTRACE=1 env
var set and include the backtrace in your report.

Platform: macos x86_64
Version: 1.32.5
Args: ["./backend"]

thread 'main' panicked at 'required type deno_cache::CreateCache<deno_cache::sqlite::SqliteBackedCache> is not present in GothamState container', /private/tmp/deno-20230419-9141-3g7nb7/deno/core/gotham_state.rs:82:3
stack backtrace:
   0: _rust_begin_unwind
   1: core::panicking::panic_fmt
   2: deno_core::gotham_state::missing
   3: deno_cache::get_cache
   4: deno_cache::op_cache_storage_open::v8_func::{{closure}}
   5: <futures_util::future::maybe_done::MaybeDone<Fut> as core::future::future::Future>::poll
   6: deno_cache::op_cache_storage_open::v8_fn_ptr
   7: __ZN2v88internal12_GLOBAL__N_119HandleApiCallHelperILb0EEENS0_11MaybeHandleINS0_6ObjectEEEPNS0_7IsolateENS0_6HandleINS0_10HeapObjectEEENS8_INS0_20FunctionTemplateInfoEEENS8_IS4_EEPmi
   8: __ZN2v88internal21Builtin_HandleApiCallEiPmPNS0_7IsolateE
```