GetRangeSourceCacheInfo

Document management, Diagnostics, Performance

Description

Returns a JSON snapshot of the byte-range cache owned by the selected callback-backed document

Syntax

Delphi

Function TPDFlib.GetRangeSourceCacheInfo(Out Info: WideString): Integer;

Parameters

InfoReceives windowCount, pendingRequests, cacheLimitBytes, cachedBytes, coalesceWindowMS, hits, misses, evictions, sourceReads, sourceBytes, repeatedReads, coalescedRequests and coalescedSourceReads

Return values

0No selected callback-backed document is available
1The snapshot was returned

Remarks

repeatedReads counts aligned source chunks fetched again after an earlier cached copy was evicted

coalescedRequests counts same-chunk waiters and adjacent chunk requests served without their own source call, while coalescedSourceReads counts physical reads that covered more than one queued chunk

pendingRequests is an instantaneous count and can include reads from an invalidated cache generation until their existing callers receive the result