C# Class AcTools.LapTimes.LevelDbUtils.Cache

A Cache is an interface that maps keys to values. It has internal synchronization and may be safely accessed concurrently from multiple threads. It may automatically evict entries to make room for new entries. Values have a specified charge against the cache capacity. For example, a cache where the values are variable length strings, may use the length of the string as the charge for the string. A builtin cache implementation with a least-recently-used eviction policy is provided. Clients may use their own implementations if they want something more sophisticated (like scan-resistance, a custom eviction policy, variable cache sizing, etc.)
Inheritance: LevelDbHandle
Show file Open project: gro-ove/actools

Public Methods

Method Description
Cache ( int capacity )

Create a new cache with a fixed size capacity. This implementation of Cache uses a LRU eviction policy.

Protected Methods

Method Description
FreeUnManagedObjects ( ) : void

Method Details

Cache() public method

Create a new cache with a fixed size capacity. This implementation of Cache uses a LRU eviction policy.
public Cache ( int capacity )
capacity int

FreeUnManagedObjects() protected method

protected FreeUnManagedObjects ( ) : void
return void