Skip to main content
Deno 2 is finally here 🎉️
Learn more
Module

x/fileserver/src/Cache.ts>Cache

A file-server command.
Latest
class Cache
import { Cache } from "https://deno.land/x/fileserver@1.1.19/src/Cache.ts";

A cache object to store responses.

Constructors

new
Cache(enabled: boolean, lifetime: number)

Initiate a new cache.

Properties

readonly
cached: Map<string, CachedResponse>

The cached responses.

Methods

response(request: Request): Response | void

Attempt to find a response for a given request.

save(request: Request, response: Response): this

Save a response for later use.