DriftTexture · interface
PageCache
Explained in DriftTexture.
interface PageCacheimport type { PageCache } from '@driftengine/texture';Properties
| Name | Type | Description |
|---|---|---|
pagesreadonly | number | |
pageBytesreadonly | number | |
bytesreadonly | Uint8Array | Every page, back to back. Slot n is [n * pageBytes, (n + 1) * pageBytes). |
holderreadonly | string[] | Which hash holds each slot, or '' where it is free. |
decodedreadonly | boolean[] | Whether each slot's bytes have been decoded into. |
slotOf | Map<string, number> | |
touchedAt | Map<string, number> | Monotonic, standing in for time, so eviction needs no clock. As table.ts does. |
clock | number | |
frameStart | number | The clock at the start of the frame. Nothing touched after it may be evicted. |
mode | DecodeMode | |
decode | PageDecode | null | |
evicted | string[] | Hashes whose pages have been taken since the caller last drained this. |