SetCacheLimitBytes
Document management, Performance, Concurrency
Description
Sets the least-recently-used byte budget that bounds how many fetched chunks the stream retains
The new limit applies immediately: the least recently used chunks are evicted, and counted as evictions, until the cached byte total fits the budget
Syntax
Delphi
Procedure TByteRangeStream.SetCacheLimitBytes(Value: Int64);Parameters
| Value | The new budget in bytes; zero or a negative value selects the 4 MiB default, and a value below one chunk is raised to ChunkSize |
|---|
Remarks
Because the limit never falls below one chunk, the most recently used chunk always stays resident
The effective value is available through CacheLimitBytes and in the GetCacheStats snapshot
See also
TByteRangeStreamReadAt, TByteRangeStreamAvailability, SetRangeSourceCacheLimit, GetRangeSourceCacheInfo