Products | Support | Email a link to this topic. | Send comments on this topic. | Back to Introduction - All Topics | Help Version 19.0.4.7
|
Leadtools.Caching Assembly > Leadtools.Caching Namespace : CacheStatistics Class |
[DataContractAttribute()] public class CacheStatistics
'Declaration
<DataContractAttribute()> Public Class CacheStatistics
'Usage
Dim instance As CacheStatistics
public class CacheStatistics
[DataContractAttribute()] public ref class CacheStatistics
A CacheStatistics object can be obtained with the FileCache.GetStatistics method and includes the following members:
Member | Description |
---|---|
Regions |
Number of current regions in the cache. If this is the cache used by the LEADTOOLS Document Viewer then each region represents a document. |
Items |
Total number of items in the cache in all regions. If this is the cache used by the LEADTOOLS Document Viewer then an item can be a page raster image, thumbnail, text data, etc. |
ExpiredItems |
Total number of items in the cache that have expired. This will be a number greater than 0 and less than or equal to Items. |
FileCache.GetStatistics returns a snapshot of the number of items in the cache. This number is increased and decreased when new items are added, deleted or expired in the cache.
When FileCache.CheckPolicy or FileCache.CheckPolicies is called, the number of ExpiredItems will decrease if any expired items are purged. For example, if GetStatistics is called and the result value of Items is 10 and ExpiredItems is 4, this means that the cache currently holds 10 items of which 4 are expired. If FileCache.CheckPolicies is called afterwards and GetStatistics is called again, then the new value of Items will be 6 (10 original minus the expired 4 items that have been purged) and the value of ExpiredItems will be 0 (no more expired items).