Internal representation of a cache entry with metadata and expiration info.

interface CacheEntry<T> {
    createdAt: number;
    expiresAt?: number;
    metadata?: Record<string, any>;
    value: T;
}

Type Parameters

  • T = any

    The type of the cached value

Properties

createdAt: number

Timestamp when the entry was created

expiresAt?: number

Optional timestamp when the entry expires

metadata?: Record<string, any>

Additional metadata associated with this entry

value: T

The actual cached value