CacheStore ClassNFX Class Library

[This is preliminary documentation and is subject to change.]

Represents an efficient in-memory cache of expiring optionally-prioritized objects. This class is higly optimized for caching of business objects in data store implementations and does not guarantee that all hash collisions are handled, that is - some data may be overridden. The implementation relies on 2 stage hashing, where the second collision replaces the existing item with the colliding one if items are equal in their priorities. The degree of collisions is controlled by 'bucketSize' and 'recPerPage' parameters that are passed to the store per table, so basically the tables are capped at a certain size and can not change (bucketSize*recPerPage). The lookup implementation is 100% lock-free, whereas the degree of mutability-related locking is controlled by 'lockCount' per table. This class is thread safe for reading and writing cache items, however it does not guarantee instant read/write consistency between threads.
Inheritance Hierarchy

OnlineSystem Object
  NFX DisposableObject
    NFX.ApplicationModel ApplicationComponent
      NFX.DataAccess.Cache CacheStore

Namespace: NFX.DataAccess.Cache
Assembly: NFX (in NFX.dll) Version: 3.0.0.1 (3.0.0.1)
Syntax

public sealed class CacheStore : ApplicationComponent, 
	INamed, IConfigurable, IInstrumentable, IExternallyParameterized
Remarks

Perfomance testing of this class vs. System.Runtime.Caching.MemoryCache storing a typical database record identified by a long key: NFX is 2.5-5 times faster for concurrent reads and takes 20% less ram. NFX is 1.3-2.5 times faster for writes
See Also