property ThumbnailCacheStatistics: TPdfThumbnailCacheStatistics; // read only
type TPdfThumbnailCacheStatistics = record
EntryCount: Integer;
StoredBytes: Int64;
HitCount: Int64;
MissCount: Int64;
EvictionCount: Int64;
end;
| EntryCount | Retained entries, counting positive bitmap entries and cached absence of optional embedded thumbnails |
| StoredBytes | Estimated bitmap memory as width times height times four bytes; zero-byte negative entries add nothing |
| HitCount | Cumulative lookups served from a retained entry |
| MissCount | Cumulative lookups that had to extract or render, including every lookup made whilst retention is disabled |
| EvictionCount | Cumulative entries dropped by least-recently-use pressure or ceiling shrinkage |
Repeated ExtractThumbnail and RenderPageThumbnail calls contribute hits and misses under the same render lock used by native PDFium page access, so the counters move only through the documented lookup paths
Every successful bitmap lookup returns a deep caller-owned copy, so freeing or modifying a returned bitmap cannot affect a later hit, and the cached entry keeps its measured bytes until it is evicted or invalidated
Counters are cumulative for the lifetime of the TPdf instance. ClearThumbnailCache and the internal invalidation paths preserve them
An eviction is counted when ceiling pressure drops a retained entry, including the governor evicting thumbnails to honour CacheBudgetBytes; dropping entries because their page was edited is invalidation and does not grow EvictionCount
The read returns a zeroed record when the cache is unavailable, which in practice only happens outside the normal component lifetime
Stats := Pdf.ThumbnailCacheStatistics;
LogThumbnailCache(Stats.EntryCount, Stats.HitCount, Stats.MissCount,
Stats.EvictionCount);