Interface ICache
The cache.
Namespace: ComponentSpace.OpenID.Cache
Assembly: ComponentSpace.OpenID.dll
Syntax
public interface ICache
Methods
Get(String)
Gets the entry from the cache.
Declaration
byte[] Get(string key)
Parameters
Type | Name | Description |
---|---|---|
System.String | key | The key. |
Returns
Type | Description |
---|---|
System.Byte[] | The cache entry or null. |
GetAsync(String)
Gets the entry from the cache.
Declaration
Task<byte[]> GetAsync(string key)
Parameters
Type | Name | Description |
---|---|---|
System.String | key | The key. |
Returns
Type | Description |
---|---|
Task<System.Byte[]> | A task that represents the get operation and returns the cache entry or null. |
Refresh(String)
Refreshes the entry in the cache.
Declaration
void Refresh(string key)
Parameters
Type | Name | Description |
---|---|---|
System.String | key | The key. |
RefreshAsync(String)
Refreshes the entry in the cache.
Declaration
Task RefreshAsync(string key)
Parameters
Type | Name | Description |
---|---|---|
System.String | key | The key. |
Returns
Type | Description |
---|---|
Task | A task that represents the refresh operation. |
Remove(String)
Removes the entry from the cache.
Declaration
void Remove(string key)
Parameters
Type | Name | Description |
---|---|---|
System.String | key | The key. |
RemoveAsync(String)
Removes the entry from the cache.
Declaration
Task RemoveAsync(string key)
Parameters
Type | Name | Description |
---|---|---|
System.String | key | The key. |
Returns
Type | Description |
---|---|
Task | A task that represents the remove operation. |
Set(String, Byte[], Nullable<TimeSpan>, Nullable<DateTimeOffset>)
Sets the entry in the cache.
Declaration
void Set(string key, byte[] bytes, TimeSpan? slidingExpiration = null, DateTimeOffset? absoluteExpiration = null)
Parameters
Type | Name | Description |
---|---|---|
System.String | key | The key. |
System.Byte[] | bytes | The cache entry. |
System.Nullable<TimeSpan> | slidingExpiration | The sliding expiration. |
System.Nullable<DateTimeOffset> | absoluteExpiration | The absolute expiration. |
SetAsync(String, Byte[], Nullable<TimeSpan>, Nullable<DateTimeOffset>)
Sets the entry in the cache.
Declaration
Task SetAsync(string key, byte[] bytes, TimeSpan? slidingExpiration = null, DateTimeOffset? absoluteExpiration = null)
Parameters
Type | Name | Description |
---|---|---|
System.String | key | The key. |
System.Byte[] | bytes | The cache entry. |
System.Nullable<TimeSpan> | slidingExpiration | The sliding expiration. |
System.Nullable<DateTimeOffset> | absoluteExpiration | The absolute expiration. |
Returns
Type | Description |
---|---|
Task | A task that represents the set operation. |