PDFium Delphi Component Docs

StructureCacheCount property

Component: TPdf  ·  Unit: PDFium
Returns how many parsed page structure trees the tagged-structure cache currently retains

Syntax

property StructureCacheCount: Integer; // read only

Description

The value counts the pages whose structure element snapshot is valid right now, so it is at most Min(StructureCacheCapacity, PageCount) while a document is loaded

The count grows as StructureElementsForPage completes and caches new trees 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 StructureCacheCapacity is zero, the count is 0

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

Example

Elements := Pdf.StructureElementsForPage[1];
LogStructureCache(Pdf.StructureCacheCount, Pdf.StructureCacheCapacity);

See Also

StructureCacheCapacity, StructureCacheHitCount, StructureCacheMissCount, StructureElementsForPage