TtlCacheSetOptions

import { TtlCacheSetOptions } from "jsr:@ende/cache";

interface ยท experimental

interface TtlCacheSetOptions

Options for TtlCache.prototype.set.

Properties

ttl

ttl?: number

A custom time-to-live in milliseconds for this entry. If supplied, overrides the cache's default TTL. Must be a finite, non-negative number.

absoluteExpiration

absoluteExpiration?: number

A maximum lifetime in milliseconds for this entry, measured from the time it is set. When slidingExpiration is enabled, the sliding window cannot extend past this duration. Throws if slidingExpiration is not enabled.

Source