Class MemoryCache<TInput, TCache>
Inheritance
System.Object
MemoryCache<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
Name | Description |
---|
TInput | |
TCache | |
Constructors
MemoryCache()#
Declaration
Fields
DEFAULT_MAX_CACHE_SIZE#
Declaration
public const int DEFAULT_MAX_CACHE_SIZE = 10000
Field Value
Type | Description |
---|
System.Int32 | |
Properties
CopyIntoCacheFunc#
Declaration
public Func<TInput, TCache> CopyIntoCacheFunc { get; set; }
Property Value
Type | Description |
---|
System.Func<TInput, TCache> | |
Dict#
Declaration
public IDictionary<object, TCache> Dict { get; }
Property Value
Type | Description |
---|
System.Collections.Generic.IDictionary<System.Object, TCache> | |
GetCacheUniqueKeyFunc#
Declaration
public Func<TCache, object> GetCacheUniqueKeyFunc { get; set; }
Property Value
Type | Description |
---|
System.Func<TCache, System.Object> | |
Declaration
public Func<TInput, object> GetInputUniqueKeyFunc { get; set; }
Property Value
Type | Description |
---|
System.Func<TInput, System.Object> | |
MaxCacheSize#
Declaration
public int MaxCacheSize { get; set; }
Property Value
Type | Description |
---|
System.Int32 | |
Records#
Declaration
public ICollection<TCache> Records { get; }
Property Value
Type | Description |
---|
System.Collections.Generic.ICollection<TCache> | |
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
Type | Description |
---|
System.Boolean | |
Contains(TInput[])#
Declaration
public bool Contains(TInput[] batch)
Parameters
Type | Name | Description |
---|
TInput[] | batch | |
Returns
Type | Description |
---|
System.Boolean | |
Init()#
Declaration
Implements#