Class KeyTransformerProxy
Base class for proxy classes that convert cache keys.
Inherited Members
Namespace: Terrasoft.Core.Store
Assembly: Terrasoft.Core.dll
Syntax
public abstract class KeyTransformerProxy : ICacheStoreProxy, ICacheStore, IBaseStore
Constructors
KeyTransformerProxy()
Declaration
protected KeyTransformerProxy()
Properties
CacheStore
The cache that the proxy class operates with.
Declaration
public ICacheStore CacheStore { get; set; }
Property Value
Type | Description |
---|---|
ICacheStore |
IsLocalCache
A characteristic that determines that the data is stored in local memory.
Declaration
public virtual bool IsLocalCache { get; }
Property Value
Type | Description |
---|---|
System.Boolean |
Item[String]
Gets or sets the cache item for the specified key.
Declaration
public object this[string key] { get; set; }
Parameters
Type | Name | Description |
---|---|---|
System.String | key | The key of the item. |
Property Value
Type | Description |
---|---|
System.Object | The value of the element for the |
Remarks
The key
passed key preconfigured in accordance with the rules for transforming the keys of the proxy class, after thet gets or sets the cache element by the transformed key.
Methods
GetValues(IEnumerable<String>)
Gets values dictionary from the cache for a given list of keys.
Declaration
public IDictionary<string, object> GetValues(IEnumerable<string> keys)
Parameters
Type | Name | Description |
---|---|---|
System.Collections.Generic.IEnumerable<System.String> | keys | A list of keys. |
Returns
Type | Description |
---|---|
System.Collections.Generic.IDictionary<System.String, System.Object> | A dictionary of values from the key cache |
Remarks
Each key from the list is preconfigured in accordance with the rules for transforming the keys of the proxy class, after that the value obtained from the cache by the transformed key is added to the resulting value dictionary. The value key in the resulting dictionary remains unchanged.
Initialize(IDictionary<String, String>)
Initializes proxy class properties with the passed parameters.
Declaration
public virtual void Initialize(IDictionary<string, string> parameters)
Parameters
Type | Name | Description |
---|---|---|
System.Collections.Generic.IDictionary<System.String, System.String> | parameters | Parameters for initialization. |
Remove(String)
Deletes the cache element by the specified key.
Declaration
public void Remove(string key)
Parameters
Type | Name | Description |
---|---|---|
System.String | key | The key of the element you are deleting. |
Remarks
The key
passed key preconfigured in accordance with the rules for transforming the keys of the proxy class, after which the element is deleted from the cache by the transformed key.
TransformKey(String)
Declaration
protected abstract string TransformKey(string key)
Parameters
Type | Name | Description |
---|---|---|
System.String | key |
Returns
Type | Description |
---|---|
System.String |