import { LoadingCapability } from "https://deno.land/x/velo@1.0.0/src/cache/capabilities/loading_capability.ts";
Adds loading functionality to a cache. The loader function is called when a cache miss occurs in get. Then the generated value is stored in the cache with set and returned. The refresh method can be used to refresh the value of a key, via the loader function.
Constructors
new
LoadingCapability(inner: Cache<K, V> & CacheInternal<K, V>, loader: LoaderFunction<K, V>)Type Parameters
K extends Key
Properties
private
loader: LoaderFunction<K, V>