Class MemoryCache<TInput, TCache>

Inheritance
System.Object
MemoryCache<TInput, TCache>
Implements
ICacheManager<TInput, TCache>
Inherited Members
System.Object.Equals(System.Object)
System.Object.Equals(System.Object, System.Object)
System.Object.GetHashCode()
System.Object.GetType()
System.Object.MemberwiseClone()
System.Object.ReferenceEquals(System.Object, System.Object)
System.Object.ToString()
Namespace: ETLBox.DataFlow
Assembly: ETLBox.dll
Syntax
    public sealed class MemoryCache<TInput, TCache> : ICacheManager<TInput, TCache>, ILimitedCache where TCache : class
Type Parameters
NameDescription
TInput
TCache

Constructors

MemoryCache()

Declaration
    public MemoryCache()

Fields

DEFAULT_MAX_CACHE_SIZE

Declaration
    public const int DEFAULT_MAX_CACHE_SIZE = 10000
Field Value
TypeDescription
System.Int32

Properties

CopyIntoCacheFunc

Declaration
    public Func<TInput, TCache> CopyIntoCacheFunc { get; set; }
Property Value
TypeDescription
System.Func<TInput, TCache>

Dict

Declaration
    public IDictionary<object, TCache> Dict { get; }
Property Value
TypeDescription
System.Collections.Generic.IDictionary<System.Object, TCache>

GetCacheUniqueKeyFunc

Declaration
    public Func<TCache, object> GetCacheUniqueKeyFunc { get; set; }
Property Value
TypeDescription
System.Func<TCache, System.Object>

GetInputUniqueKeyFunc

Declaration
    public Func<TInput, object> GetInputUniqueKeyFunc { get; set; }
Property Value
TypeDescription
System.Func<TInput, System.Object>

MaxCacheSize

Declaration
    public int MaxCacheSize { get; set; }
Property Value
TypeDescription
System.Int32

Records

Declaration
    public ICollection<TCache> Records { get; }
Property Value
TypeDescription
System.Collections.Generic.ICollection<TCache>

Methods

Add(TInput)

Declaration
    public void Add(TInput row)
Parameters
TypeNameDescription
TInputrow

Add(TInput[])

Declaration
    public void Add(TInput[] batch)
Parameters
TypeNameDescription
TInput[]batch

Contains(TInput)

Declaration
    public bool Contains(TInput row)
Parameters
TypeNameDescription
TInputrow
Returns
TypeDescription
System.Boolean

Contains(TInput[])

Declaration
    public bool Contains(TInput[] batch)
Parameters
TypeNameDescription
TInput[]batch
Returns
TypeDescription
System.Boolean

Init()

Declaration
    public void Init()

Implements