Class MemoryCache<TInput, TCache>
Inheritance
MemoryCache<TInput, TCache>
Namespace: ETLBox.DataFlow
Assembly: ETLBox.dll
Syntax
public sealed class MemoryCache<TInput, TCache> : ICacheManager<TInput, TCache>, ILimitedCache where TCache : class
Type Parameters
Name | Description |
---|
TInput | |
TCache | |
Constructors
MemoryCache()
Declaration
Fields
DEFAULT_MAX_CACHE_SIZE
Declaration
public const int DEFAULT_MAX_CACHE_SIZE = 10000
Field Value
Properties
CopyIntoCacheFunc
Declaration
public Func<TInput, TCache> CopyIntoCacheFunc { get; set; }
Property Value
Type | Description |
---|
Func<TInput, TCache> | |
Dict
Declaration
public IDictionary<object, TCache> Dict { get; }
Property Value
GetCacheUniqueKeyFunc
Declaration
public Func<TCache, object> GetCacheUniqueKeyFunc { get; set; }
Property Value
Declaration
public Func<TInput, object> GetInputUniqueKeyFunc { get; set; }
Property Value
MaxCacheSize
Declaration
public int MaxCacheSize { get; set; }
Property Value
Records
Declaration
public IEnumerable<TCache> Records { get; }
Property Value
Methods
Add(TInput)
Declaration
public void Add(TInput row)
Parameters
Type | Name | Description |
---|
TInput | row | |
Add(TInput[])
Declaration
public void Add(TInput[] batch)
Parameters
Type | Name | Description |
---|
TInput[] | batch | |
Contains(TInput)
Declaration
public bool Contains(TInput row)
Parameters
Type | Name | Description |
---|
TInput | row | |
Returns
Contains(TInput[])
Declaration
public bool Contains(TInput[] batch)
Parameters
Type | Name | Description |
---|
TInput[] | batch | |
Returns
Init()
Declaration
Implements