Statistics about the cache

interface CacheStats {
    byType: Record<CacheEntryType, {
        count: number;
        sizeBytes: number;
    }>;
    hits: number;
    misses: number;
    newestEntry: number;
    oldestEntry: number;
    totalEntries: number;
    totalSizeBytes: number;
}

Properties

byType: Record<CacheEntryType, {
    count: number;
    sizeBytes: number;
}>

Breakdown by cache entry type

Type declaration

  • count: number
  • sizeBytes: number
hits: number

Number of cache hits since initialization

misses: number

Number of cache misses since initialization

newestEntry: number

Timestamp of newest cache entry

oldestEntry: number

Timestamp of oldest cache entry

totalEntries: number

Total number of cached entries

totalSizeBytes: number

Total size of all cached data in bytes