Skip to main content
Module

x/deno_cache/mod.ts>FetchCacher

A TypeScript implementation of Deno CLI's module cache
Extremely Popular
Go to Latest
class FetchCacher
Re-export
import { FetchCacher } from "https://deno.land/x/deno_cache@0.4.1/mod.ts";

Provides an interface to Deno's CLI cache.

It is better to use the createCache function directly.

Constructors

new
FetchCacher(
diskCache: DiskCache,
httpCache: HttpCache,
fileFetcher: FileFetcher,
readOnly?: boolean,
)

Properties

cacheInfo: (specifier: string) => CacheInfo

Provides information about the state of the cache, which is used by things like deno_graph to enrich the information about a module graph.

load: (specifier: string) => Promise<LoadResponse | undefined>

Methods

get(type: CacheType, specifier: string): Promise<string | undefined>
set(
type: CacheType,
specifier: string,
value: string,
): Promise<void>