property CacheGovernorStatistics: TPdfCacheGovernorStatistics; // read only
type TPdfCacheGovernorStatistics = record
MaxBytes: Int64;
StoredBytes: Int64;
PeakStoredBytes: Int64;
PinnedBytes: Int64;
EntryCount: Integer;
ReservationCount: Int64;
TouchCount: Int64;
EvictionCount: Int64;
RejectionCount: Int64;
end;
| MaxBytes | Configured ceiling, equal to CacheBudgetBytes |
| StoredBytes | Sum of the measured bytes of all currently retained entries |
| PeakStoredBytes | High-water mark of StoredBytes since the instance was created |
| PinnedBytes | Portion of stored bytes held by pinned entries, currently active parsed page scenes |
| EntryCount | Number of retained entries across every participating cache |
| ReservationCount | Cumulative count of accepted cache insertions |
| TouchCount | Cumulative count of least-recently-use refreshes, one per cache hit on a retained entry |
| EvictionCount | Cumulative count of entries dropped to keep usage within the budget |
| RejectionCount | Cumulative count of insertions refused because the budget is zero, the entry alone exceeds MaxBytes, or nothing is evictable |
The record is declared in the FPdfCache unit and mirrors the state of the private governor described on the CacheGovernor page. The values are gathered under the governor lock, so one read returns a mutually consistent view even while other threads render or read pages
The snapshot covers retained library cache entries only. Caller-owned bitmap copies and returned snapshot copies remain outside the budget, while decoded-stream reads remain ephemeral and keep their per-operation hard limits
Counters are cumulative for the lifetime of the TPdf instance; capacity changes, cache clears, and document reloads preserve them
An eviction is only counted when budget pressure drops an entry; releasing an entry because its page was edited or its cache was cleared explicitly is not an eviction
When the governor is unavailable the getter returns a zeroed record with every field at its default value
Stats := Pdf.CacheGovernorStatistics;
if Stats.PeakStoredBytes > Pdf.CacheBudgetBytes div 2 then
LogCachePressure(Stats.StoredBytes, Stats.EvictionCount);