Interface ITwoLayerCache
Двухуровневый кэш.
Namespace:InfinniPlatform.Cache
Assembly:InfinniPlatform.Cache.Abstractions.dll
Syntax
public interface ITwoLayerCache
Remarks
Использует два уровня кэширования IInMemoryCache и ISharedCache для увеличения производительности доступа к данным.
Methods
| Improve this Doc View SourceContains(String)
Проверяет наличие ключа в кэше.
Declaration
bool Contains(string key)
Parameters
Type | Name | Description |
---|---|---|
System.String | key | Ключ. |
Returns
Type | Description |
---|---|
System.Boolean | Возвращает true, если кэш содержит ключ, иначе - false. |
Get(String)
Возвращает значение ключа из кэша.
Declaration
string Get(string key)
Parameters
Type | Name | Description |
---|---|---|
System.String | key | Ключ. |
Returns
Type | Description |
---|---|
System.String | Значение. |
Remove(String)
Удаляет ключ из кэша.
Declaration
bool Remove(string key)
Parameters
Type | Name | Description |
---|---|---|
System.String | key | Ключ. |
Returns
Type | Description |
---|---|
System.Boolean |
Set(String, String)
Устанавливает значение ключа в кэше.
Declaration
void Set(string key, string value)
Parameters
Type | Name | Description |
---|---|---|
System.String | key | Ключ. |
System.String | value | Значение. |
TryGet(String, out String)
Возвращает значение ключа из кэша.
Declaration
bool TryGet(string key, out string value)
Parameters
Type | Name | Description |
---|---|---|
System.String | key | Ключ. |
System.String | value | Значение. |
Returns
Type | Description |
---|---|
System.Boolean | Возвращает true, если кэш содержит ключ, иначе - false. |