DriftTexture · interface

PageCache

Explained in DriftTexture.

interface PageCache
import type { PageCache } from '@driftengine/texture';

Properties

NameTypeDescription
pagesreadonlynumber
pageBytesreadonlynumber
bytesreadonlyUint8ArrayEvery page, back to back. Slot n is [n * pageBytes, (n + 1) * pageBytes).
holderreadonlystring[]Which hash holds each slot, or '' where it is free.
decodedreadonlyboolean[]Whether each slot's bytes have been decoded into.
slotOfMap<string, number>
touchedAtMap<string, number>Monotonic, standing in for time, so eviction needs no clock. As table.ts does.
clocknumber
frameStartnumberThe clock at the start of the frame. Nothing touched after it may be evicted.
modeDecodeMode
decodePageDecode | null
evictedstring[]Hashes whose pages have been taken since the caller last drained this.