| Type | Description |
|---|---|
EPdfCacheError | Reports invalid budgets, entry sizes, and participants |
TPdfCacheKind | Classifies page scenes (pckPageScene), tiles (pckTile), thumbnails (pckThumbnail), system fonts (pckSystemFont), structure data (pckStructure), text snapshots (pckTextSnapshot), page-object snapshots (pckPageObjectSnapshot), decoded streams (pckDecodedStream), and application entries (pckApplication) |
TPdfCacheGovernorStatistics | Reports the budget, current and peak retained bytes, pinned bytes, entry count, reservations, touches, evictions, and rejections; fields include MaxBytes, StoredBytes, PeakStoredBytes, PinnedBytes, EntryCount, ReservationCount, TouchCount, EvictionCount, RejectionCount |
TPdfCacheParticipant | Receives synchronous EvictCacheEntry callbacks after the governor has removed a token from its accounting |
TPdfCacheGovernorEntry | Internal accounting record exposed for compiler compatibility; fields include Token, Participant, Kind, StoredBytes, LastUsed, and Pinned |
TPdfCacheGovernor | Thread-safe token registry with one global least-recently-used order across participants and cache kinds |
| Member | Description |
|---|---|
Create(AMaxBytes: Int64) | Creates a governor with a non-negative byte budget |
Destroy | Clears registered entries before releasing the synchronization state |
Reserve | Reserves bytes and returns a positive token, evicting global LRU entries when possible or returning zero when the entry cannot fit |
Touch | Moves an existing token to the newest position |
Release | Removes accounting for a token without invoking its eviction callback |
SetPinned | Protects or unprotects an in-use entry and trims after unpinning |
Clear | Removes all tokens and asks every participant to release its retained entry |
Contains | Tests whether a token remains registered |
UsageForKind | Returns retained bytes for one TPdfCacheKind |
EntryCountForKind | Returns the registered entry count for one TPdfCacheKind |
Statistics | Returns a lock-protected telemetry snapshot |
MaxBytes | Reads or changes the total budget and immediately trims unpinned entries after a reduction |
The governor never owns participants or their retained data
Every participant must outlive all of its registered tokens and must not raise from EvictCacheEntry
Callbacks run synchronously without the governor lock held, so participants may safely call Release for related tokens
Pinned entries may temporarily keep StoredBytes above a reduced MaxBytes value until the last user unpins them
FPDF_RENDER_LIMITEDIMAGECACHE remains available through reLimitCache and applies PDFium's fixed native per-page image-cache limit
PDFium exposes no public ABI for a configurable or queryable process-wide cache byte budget
The governor therefore measures PDFiumPas-owned retained objects and uses an explicit estimate for opaque parsed page scenes