Skip to main content
Module

x/deno_cache/mod.ts>CacheOptions

Deno CLI's module cache
Go to Latest
interface CacheOptions
import { type CacheOptions } from "https://deno.land/x/deno_cache@0.6.2/mod.ts";

Properties

optional
allowRemote: boolean

Allow remote URLs to be fetched if missing from the cache. This defaults to true. Setting it to false is like passing the --no-remote in the Deno CLI, meaning that any modules not in cache error.

optional
cacheSetting: CacheSetting

Determines how the cache will be used. The default value is "use" meaning the cache will be used, and any remote module cache misses will be fetched and stored in the cache.

optional
readOnly: boolean

This forces the cache into a readOnly mode, where fetched resources will not be stored on disk if true. The default is detected from the environment, checking to see if Deno.writeFile exists.

optional
root: string | URL

Specifies a path to the root of the cache. Setting this value overrides the detection of location from the environment.

optional
vendorRoot: string | URL

Specifies a path to the local vendor directory if it exists.