Module

x/live/runtime/caches/tiered.ts

Open-Source web editor based on Preact, Tailwind and TypeScript. The other side of code.
Go to Latest
import * as mod from "https://dotland.deno.dev/x/live@1.63.12/runtime/caches/tiered.ts";

Functions

Creates a tiered cache that combines multiple cache storages into a single cache storage. The tiered cache will prioritize the caches in the order they are provided. When a request is made to the tiered cache, it will first check if the request is available in any of the caches. If a match is found, the response will be returned and the caches will be updated based on the cache priority. If no match is found, the request will be fetched and stored in the caches based on the cache priority.