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

x/dtils/mod.ts>FsCache

The best unofficial library of utilities for Deno applications
Go to Latest
class FsCache
Re-export
import { FsCache } from "https://deno.land/x/dtils@2.4.0/mod.ts";

Constructors

new
FsCache(scope?: string)

Methods

clear(): Promise<void>

Removes all entries under scope in cache dir

getBytes(key: string): Promise<Uint8Array | null>

Get a cache entry key as bytes

getString(key: string): Promise<string | null>

Get cache entry key as a string

list(): Promise<string[]>

List all the keys in this particular cache

set(key: string, content: string | Uint8Array): Promise<void>

Set a cache entry at key. Entry can be either a string or plain bytes