PDFium Delphi Component Docs

PageObjectSnapshotCacheCount property

Component: TPdf  ·  Unit: PDFium
Returns how many complete page-object snapshots the snapshot cache currently retains

Syntax

property PageObjectSnapshotCacheCount: Integer; // read only

Description

The value counts the pages whose page-object snapshot is valid right now, so it is at most Min(PageObjectSnapshotCacheCapacity, PageCount) while a document is loaded

The count grows as PageObjectsSnapshot completes and caches new snapshots and falls when capacity pressure, page edits, or document reloads invalidate entries

Reading is guarded by the render lock used by native PDFium page access, so the value is consistent with concurrent rendering

Remarks

With no document loaded, or while PageObjectSnapshotCacheCapacity is zero, the count is 0

The count is a point-in-time occupancy figure; use PageObjectSnapshotCacheHitCount and PageObjectSnapshotCacheMissCount for cumulative lookup effectiveness

Example

Snapshot := Pdf.PageObjectsSnapshot[1];
LogPageObjectSnapshotCache(Pdf.PageObjectSnapshotCacheCount,
  Pdf.PageObjectSnapshotCacheCapacity);

See Also

PageObjectSnapshotCacheCapacity, PageObjectSnapshotCacheHitCount, PageObjectSnapshotCacheMissCount, PageObjectsSnapshot