interface CacheEntry {
    expire: number;
    revalidate: number;
    stale: number;
    tags: string[];
    timestamp: number;
    value: ReadableStream<Uint8Array<ArrayBufferLike>>;
}

Properties

expire: number

How long the entry is allowed to be used (should be longer than revalidate) [duration in seconds]

revalidate: number

How long until the entry should be revalidated [duration in seconds]

stale: number

This is for the client, not used to calculate cache entry expiration [duration in seconds]

tags: string[]

The tags configured for the entry excluding soft tags

timestamp: number

When the cache entry was created [timestamp in milliseconds]

value: ReadableStream<Uint8Array<ArrayBufferLike>>

The ReadableStream can error and only have partial data so any cache handlers need to handle this case and decide to keep the partial cache around or not.