CacheClientAsyncWrapper
Assembly: ServiceStack.dll
View Source
public class CacheClientAsyncWrapper : ICacheClientAsync, IRemoveByPatternAsync
Properties
Cache
View Source
public ICacheClient Cache { get; }
Methods
RemoveAsync(String, CancellationToken)
View Source
public Task<bool> RemoveAsync(string key, CancellationToken token = default(CancellationToken))
Returns
System.Threading.Tasks.Task<System.Boolean>
Parameters
Type | Name |
---|---|
System.String | key |
System.Threading.CancellationToken | token |
RemoveAllAsync(IEnumerable<String>, CancellationToken)
View Source
public Task RemoveAllAsync(IEnumerable<string> keys, CancellationToken token = default(CancellationToken))
Returns
System.Threading.Tasks.Task
Parameters
Type | Name |
---|---|
System.Collections.Generic.IEnumerable<System.String> | keys |
System.Threading.CancellationToken | token |
GetAsync<T>(String, CancellationToken)
View Source
public Task<T> GetAsync<T>(string key, CancellationToken token = default(CancellationToken))
Returns
System.Threading.Tasks.Task<<T>>
Parameters
Type | Name |
---|---|
System.String | key |
System.Threading.CancellationToken | token |
Type Parameters
T
IncrementAsync(String, UInt32, CancellationToken)
View Source
public Task<long> IncrementAsync(string key, uint amount, CancellationToken token = default(CancellationToken))
Returns
System.Threading.Tasks.Task<System.Int64>
Parameters
Type | Name |
---|---|
System.String | key |
System.UInt32 | amount |
System.Threading.CancellationToken | token |
DecrementAsync(String, UInt32, CancellationToken)
View Source
public Task<long> DecrementAsync(string key, uint amount, CancellationToken token = default(CancellationToken))
Returns
System.Threading.Tasks.Task<System.Int64>
Parameters
Type | Name |
---|---|
System.String | key |
System.UInt32 | amount |
System.Threading.CancellationToken | token |
AddAsync<T>(String, T, CancellationToken)
View Source
public Task<bool> AddAsync<T>(string key, T value, CancellationToken token = default(CancellationToken))
Returns
System.Threading.Tasks.Task<System.Boolean>
Parameters
Type | Name |
---|---|
System.String | key |
<T> | value |
System.Threading.CancellationToken | token |
Type Parameters
T
SetAsync<T>(String, T, CancellationToken)
View Source
public Task<bool> SetAsync<T>(string key, T value, CancellationToken token = default(CancellationToken))
Returns
System.Threading.Tasks.Task<System.Boolean>
Parameters
Type | Name |
---|---|
System.String | key |
<T> | value |
System.Threading.CancellationToken | token |
Type Parameters
T
ReplaceAsync<T>(String, T, CancellationToken)
View Source
public Task<bool> ReplaceAsync<T>(string key, T value, CancellationToken token = default(CancellationToken))
Returns
System.Threading.Tasks.Task<System.Boolean>
Parameters
Type | Name |
---|---|
System.String | key |
<T> | value |
System.Threading.CancellationToken | token |
Type Parameters
T
AddAsync<T>(String, T, DateTime, CancellationToken)
View Source
public Task<bool> AddAsync<T>(string key, T value, DateTime expiresAt, CancellationToken token = default(CancellationToken))
Returns
System.Threading.Tasks.Task<System.Boolean>
Parameters
Type | Name |
---|---|
System.String | key |
<T> | value |
System.DateTime | expiresAt |
System.Threading.CancellationToken | token |
Type Parameters
T
SetAsync<T>(String, T, DateTime, CancellationToken)
View Source
public Task<bool> SetAsync<T>(string key, T value, DateTime expiresAt, CancellationToken token = default(CancellationToken))
Returns
System.Threading.Tasks.Task<System.Boolean>
Parameters
Type | Name |
---|---|
System.String | key |
<T> | value |
System.DateTime | expiresAt |
System.Threading.CancellationToken | token |
Type Parameters
T
ReplaceAsync<T>(String, T, DateTime, CancellationToken)
View Source
public Task<bool> ReplaceAsync<T>(string key, T value, DateTime expiresAt, CancellationToken token = default(CancellationToken))
Returns
System.Threading.Tasks.Task<System.Boolean>
Parameters
Type | Name |
---|---|
System.String | key |
<T> | value |
System.DateTime | expiresAt |
System.Threading.CancellationToken | token |
Type Parameters
T
AddAsync<T>(String, T, TimeSpan, CancellationToken)
View Source
public Task<bool> AddAsync<T>(string key, T value, TimeSpan expiresIn, CancellationToken token = default(CancellationToken))
Returns
System.Threading.Tasks.Task<System.Boolean>
Parameters
Type | Name |
---|---|
System.String | key |
<T> | value |
System.TimeSpan | expiresIn |
System.Threading.CancellationToken | token |
Type Parameters
T
SetAsync<T>(String, T, TimeSpan, CancellationToken)
View Source
public Task<bool> SetAsync<T>(string key, T value, TimeSpan expiresIn, CancellationToken token = default(CancellationToken))
Returns
System.Threading.Tasks.Task<System.Boolean>
Parameters
Type | Name |
---|---|
System.String | key |
<T> | value |
System.TimeSpan | expiresIn |
System.Threading.CancellationToken | token |
Type Parameters
T
ReplaceAsync<T>(String, T, TimeSpan, CancellationToken)
View Source
public Task<bool> ReplaceAsync<T>(string key, T value, TimeSpan expiresIn, CancellationToken token = default(CancellationToken))
Returns
System.Threading.Tasks.Task<System.Boolean>
Parameters
Type | Name |
---|---|
System.String | key |
<T> | value |
System.TimeSpan | expiresIn |
System.Threading.CancellationToken | token |
Type Parameters
T
FlushAllAsync(CancellationToken)
View Source
public Task FlushAllAsync(CancellationToken token = default(CancellationToken))
Returns
System.Threading.Tasks.Task
Parameters
Type | Name |
---|---|
System.Threading.CancellationToken | token |
GetAllAsync<T>(IEnumerable<String>, CancellationToken)
View Source
public Task<IDictionary<string, T>> GetAllAsync<T>(IEnumerable<string> keys, CancellationToken token = default(CancellationToken))
Returns
System.Threading.Tasks.Task<System.Collections.Generic.IDictionary<System.String,<T>>>
Parameters
Type | Name |
---|---|
System.Collections.Generic.IEnumerable<System.String> | keys |
System.Threading.CancellationToken | token |
Type Parameters
T
SetAllAsync<T>(IDictionary<String, T>, CancellationToken)
View Source
public Task SetAllAsync<T>(IDictionary<string, T> values, CancellationToken token = default(CancellationToken))
Returns
System.Threading.Tasks.Task
Parameters
Type | Name |
---|---|
System.Collections.Generic.IDictionary<System.String,<T>> | values |
System.Threading.CancellationToken | token |
Type Parameters
T
GetTimeToLiveAsync(String, CancellationToken)
View Source
public Task<TimeSpan?> GetTimeToLiveAsync(string key, CancellationToken token = default(CancellationToken))
Returns
System.Threading.Tasks.Task<System.Nullable<System.TimeSpan>>
Parameters
Type | Name |
---|---|
System.String | key |
System.Threading.CancellationToken | token |
RemoveExpiredEntriesAsync(CancellationToken)
View Source
public Task RemoveExpiredEntriesAsync(CancellationToken token = default(CancellationToken))
Returns
System.Threading.Tasks.Task
Parameters
Type | Name |
---|---|
System.Threading.CancellationToken | token |
RemoveByPatternAsync(String, CancellationToken)
View Source
public Task RemoveByPatternAsync(string pattern, CancellationToken token = default(CancellationToken))
Returns
System.Threading.Tasks.Task
Parameters
Type | Name |
---|---|
System.String | pattern |
System.Threading.CancellationToken | token |
RemoveByRegexAsync(String, CancellationToken)
View Source
public Task RemoveByRegexAsync(string regex, CancellationToken token = default(CancellationToken))
Returns
System.Threading.Tasks.Task
Parameters
Type | Name |
---|---|
System.String | regex |
System.Threading.CancellationToken | token |
GetKeysByPatternAsync(String, CancellationToken)
View Source
public async IAsyncEnumerable<string> GetKeysByPatternAsync(string pattern, CancellationToken token = default(CancellationToken))
Returns
IAsyncEnumerable<System.String>
Parameters
Type | Name |
---|---|
System.String | pattern |
System.Threading.CancellationToken | token |
DisposeAsync()
View Source
public ValueTask DisposeAsync()
Returns
ValueTask