PDFium Delphi Component Docs

PageObjectSnapshotCacheHitCount property

Component: TPdf  ·  Unit: PDFium
Counts page-object snapshot reads served from a retained page snapshot

Syntax

property PageObjectSnapshotCacheHitCount: Int64; // read only

Description

The counter increments once for every PageObjectsSnapshot access whose page already holds a valid snapshot. The hit refreshes the page slot in least-recently-use order, touches the entry in the shared cache governor, and returns a deep copy of the retained snapshot

PageComplexity reuses this cache for object types, path counts, image pixels, and transparency, so repeated complexity reads also surface here as hits

The value is cumulative for the lifetime of the TPdf instance and never resets

Remarks

Reading is guarded by the render lock used by native PDFium page access

Capacity changes, page edits, document reloads, and clears preserve the counter; they change what is retained, not what already happened

Because every return value is a deep copy, changing nested dash arrays, mark parameters, path segments, clip paths, filters, or strings cannot modify cached data or the document

Example

Info := Pdf.PageComplexity;
Snapshot := Pdf.PageObjectsSnapshot[PageNumber];
// The complexity read warmed the slot, the snapshot read hit it

See Also

PageObjectSnapshotCacheMissCount, PageObjectSnapshotCacheCount, PageObjectSnapshotCacheCapacity, PageObjectsSnapshot