libCZI
Reading and Writing CZI documents made easy
libCZI::ISubBlockCacheControl::PruneOptions Struct Reference

#include <libCZI_Compositor.h>

Public Attributes

std::uint64_t maxMemoryUsage { (std::numeric_limits<decltype(maxMemoryUsage)>::max)() }
 
std::uint32_t maxSubBlockCount { (std::numeric_limits<decltype(maxSubBlockCount)>::max)() }
 

Detailed Description

Options for controlling the prune operation. There are two metrics which can be used to control what remains in the cache and what is discarded: the maximum memory usage (for all elements in the cache) and the maximum number of sub-blocks. If the cache exceeds one of those limits, then elements are evicted from the cache until both conditions are met. Eviction is done in the order starting with elements which have been least recently accessed. As "access" we define either the Add-operation or the Get-operation - so, when an element is retrieved from the cache, it is considered as "accessed". If only one condition is desired, then the other condition can be set to the maximum value of the respective type (which is the default value).

Member Data Documentation

◆ maxMemoryUsage

std::uint64_t libCZI::ISubBlockCacheControl::PruneOptions::maxMemoryUsage { (std::numeric_limits<decltype(maxMemoryUsage)>::max)() }

The maximum memory usage (in bytes) for the cache. If the cache exceeds this limit, then the least recently used sub-blocks are removed from the cache.

◆ maxSubBlockCount

std::uint32_t libCZI::ISubBlockCacheControl::PruneOptions::maxSubBlockCount { (std::numeric_limits<decltype(maxSubBlockCount)>::max)() }

The maximum number of sub-blocks in the cache. If the cache exceeds this limit, then the least recently used sub-blocks are removed from the cache.


The documentation for this struct was generated from the following file: