Skip to main content

MultiCacheClient

Assembly: ServiceStack.dll
View Source
Declaration
public class MultiCacheClient : ICacheClient, IDisposable, ICacheClientAsync

Methods

Dispose()

View Source
Declaration
public void Dispose()

Remove(String)

View Source
Declaration
public bool Remove(string key)
Returns

System.Boolean

Parameters
TypeName
System.Stringkey

Get<T>(String)

View Source
Declaration
public T Get<T>(string key)
Returns

<T>

Parameters
TypeName
System.Stringkey
Type Parameters
  • T

Increment(String, UInt32)

View Source
Declaration
public long Increment(string key, uint amount)
Returns

System.Int64

Parameters
TypeName
System.Stringkey
System.UInt32amount

Decrement(String, UInt32)

View Source
Declaration
public long Decrement(string key, uint amount)
Returns

System.Int64

Parameters
TypeName
System.Stringkey
System.UInt32amount

Add<T>(String, T)

View Source
Declaration
public bool Add<T>(string key, T value)
Returns

System.Boolean

Parameters
TypeName
System.Stringkey
<T>value
Type Parameters
  • T

Set<T>(String, T)

View Source
Declaration
public bool Set<T>(string key, T value)
Returns

System.Boolean

Parameters
TypeName
System.Stringkey
<T>value
Type Parameters
  • T

Replace<T>(String, T)

View Source
Declaration
public bool Replace<T>(string key, T value)
Returns

System.Boolean

Parameters
TypeName
System.Stringkey
<T>value
Type Parameters
  • T

Add<T>(String, T, DateTime)

View Source
Declaration
public bool Add<T>(string key, T value, DateTime expiresAt)
Returns

System.Boolean

Parameters
TypeName
System.Stringkey
<T>value
System.DateTimeexpiresAt
Type Parameters
  • T

Set<T>(String, T, DateTime)

View Source
Declaration
public bool Set<T>(string key, T value, DateTime expiresAt)
Returns

System.Boolean

Parameters
TypeName
System.Stringkey
<T>value
System.DateTimeexpiresAt
Type Parameters
  • T

Replace<T>(String, T, DateTime)

View Source
Declaration
public bool Replace<T>(string key, T value, DateTime expiresAt)
Returns

System.Boolean

Parameters
TypeName
System.Stringkey
<T>value
System.DateTimeexpiresAt
Type Parameters
  • T

Add<T>(String, T, TimeSpan)

View Source
Declaration
public bool Add<T>(string key, T value, TimeSpan expiresIn)
Returns

System.Boolean

Parameters
TypeName
System.Stringkey
<T>value
System.TimeSpanexpiresIn
Type Parameters
  • T

Set<T>(String, T, TimeSpan)

View Source
Declaration
public bool Set<T>(string key, T value, TimeSpan expiresIn)
Returns

System.Boolean

Parameters
TypeName
System.Stringkey
<T>value
System.TimeSpanexpiresIn
Type Parameters
  • T

Replace<T>(String, T, TimeSpan)

View Source
Declaration
public bool Replace<T>(string key, T value, TimeSpan expiresIn)
Returns

System.Boolean

Parameters
TypeName
System.Stringkey
<T>value
System.TimeSpanexpiresIn
Type Parameters
  • T

FlushAll()

View Source
Declaration
public void FlushAll()

GetAll<T>(IEnumerable<String>)

View Source
Declaration
public IDictionary<string, T> GetAll<T>(IEnumerable<string> keys)
Returns

System.Collections.Generic.IDictionary<System.String,<T>>

Parameters
TypeName
System.Collections.Generic.IEnumerable<System.String>keys
Type Parameters
  • T

RemoveAll(IEnumerable<String>)

View Source
Declaration
public void RemoveAll(IEnumerable<string> keys)
Parameters
TypeName
System.Collections.Generic.IEnumerable<System.String>keys

SetAll<T>(IDictionary<String, T>)

View Source
Declaration
public void SetAll<T>(IDictionary<string, T> values)
Parameters
TypeName
System.Collections.Generic.IDictionary<System.String,<T>>values
Type Parameters
  • T

RemoveAsync(String, CancellationToken)

View Source
Declaration
public async Task<bool> RemoveAsync(string key, CancellationToken token = default(CancellationToken))
Returns

System.Threading.Tasks.Task<System.Boolean>

Parameters
TypeName
System.Stringkey
System.Threading.CancellationTokentoken

RemoveAllAsync(IEnumerable<String>, CancellationToken)

View Source
Declaration
public async Task RemoveAllAsync(IEnumerable<string> keys, CancellationToken token = default(CancellationToken))
Returns

System.Threading.Tasks.Task

Parameters
TypeName
System.Collections.Generic.IEnumerable<System.String>keys
System.Threading.CancellationTokentoken

GetAsync<T>(String, CancellationToken)

View Source
Declaration
public async Task<T> GetAsync<T>(string key, CancellationToken token = default(CancellationToken))
Returns

System.Threading.Tasks.Task<<T>>

Parameters
TypeName
System.Stringkey
System.Threading.CancellationTokentoken
Type Parameters
  • T

IncrementAsync(String, UInt32, CancellationToken)

View Source
Declaration
public async Task<long> IncrementAsync(string key, uint amount, CancellationToken token = default(CancellationToken))
Returns

System.Threading.Tasks.Task<System.Int64>

Parameters
TypeName
System.Stringkey
System.UInt32amount
System.Threading.CancellationTokentoken

DecrementAsync(String, UInt32, CancellationToken)

View Source
Declaration
public async Task<long> DecrementAsync(string key, uint amount, CancellationToken token = default(CancellationToken))
Returns

System.Threading.Tasks.Task<System.Int64>

Parameters
TypeName
System.Stringkey
System.UInt32amount
System.Threading.CancellationTokentoken

AddAsync<T>(String, T, CancellationToken)

View Source
Declaration
public async Task<bool> AddAsync<T>(string key, T value, CancellationToken token = default(CancellationToken))
Returns

System.Threading.Tasks.Task<System.Boolean>

Parameters
TypeName
System.Stringkey
<T>value
System.Threading.CancellationTokentoken
Type Parameters
  • T

SetAsync<T>(String, T, CancellationToken)

View Source
Declaration
public async Task<bool> SetAsync<T>(string key, T value, CancellationToken token = default(CancellationToken))
Returns

System.Threading.Tasks.Task<System.Boolean>

Parameters
TypeName
System.Stringkey
<T>value
System.Threading.CancellationTokentoken
Type Parameters
  • T

ReplaceAsync<T>(String, T, CancellationToken)

View Source
Declaration
public async Task<bool> ReplaceAsync<T>(string key, T value, CancellationToken token = default(CancellationToken))
Returns

System.Threading.Tasks.Task<System.Boolean>

Parameters
TypeName
System.Stringkey
<T>value
System.Threading.CancellationTokentoken
Type Parameters
  • T

AddAsync<T>(String, T, DateTime, CancellationToken)

View Source
Declaration
public async Task<bool> AddAsync<T>(string key, T value, DateTime expiresAt, CancellationToken token = default(CancellationToken))
Returns

System.Threading.Tasks.Task<System.Boolean>

Parameters
TypeName
System.Stringkey
<T>value
System.DateTimeexpiresAt
System.Threading.CancellationTokentoken
Type Parameters
  • T

SetAsync<T>(String, T, DateTime, CancellationToken)

View Source
Declaration
public async Task<bool> SetAsync<T>(string key, T value, DateTime expiresAt, CancellationToken token = default(CancellationToken))
Returns

System.Threading.Tasks.Task<System.Boolean>

Parameters
TypeName
System.Stringkey
<T>value
System.DateTimeexpiresAt
System.Threading.CancellationTokentoken
Type Parameters
  • T

ReplaceAsync<T>(String, T, DateTime, CancellationToken)

View Source
Declaration
public async Task<bool> ReplaceAsync<T>(string key, T value, DateTime expiresAt, CancellationToken token = default(CancellationToken))
Returns

System.Threading.Tasks.Task<System.Boolean>

Parameters
TypeName
System.Stringkey
<T>value
System.DateTimeexpiresAt
System.Threading.CancellationTokentoken
Type Parameters
  • T

AddAsync<T>(String, T, TimeSpan, CancellationToken)

View Source
Declaration
public async Task<bool> AddAsync<T>(string key, T value, TimeSpan expiresIn, CancellationToken token = default(CancellationToken))
Returns

System.Threading.Tasks.Task<System.Boolean>

Parameters
TypeName
System.Stringkey
<T>value
System.TimeSpanexpiresIn
System.Threading.CancellationTokentoken
Type Parameters
  • T

SetAsync<T>(String, T, TimeSpan, CancellationToken)

View Source
Declaration
public async Task<bool> SetAsync<T>(string key, T value, TimeSpan expiresIn, CancellationToken token = default(CancellationToken))
Returns

System.Threading.Tasks.Task<System.Boolean>

Parameters
TypeName
System.Stringkey
<T>value
System.TimeSpanexpiresIn
System.Threading.CancellationTokentoken
Type Parameters
  • T

ReplaceAsync<T>(String, T, TimeSpan, CancellationToken)

View Source
Declaration
public async Task<bool> ReplaceAsync<T>(string key, T value, TimeSpan expiresIn, CancellationToken token = default(CancellationToken))
Returns

System.Threading.Tasks.Task<System.Boolean>

Parameters
TypeName
System.Stringkey
<T>value
System.TimeSpanexpiresIn
System.Threading.CancellationTokentoken
Type Parameters
  • T

FlushAllAsync(CancellationToken)

View Source
Declaration
public async Task FlushAllAsync(CancellationToken token = default(CancellationToken))
Returns

System.Threading.Tasks.Task

Parameters
TypeName
System.Threading.CancellationTokentoken

GetAllAsync<T>(IEnumerable<String>, CancellationToken)

View Source
Declaration
public async 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
TypeName
System.Collections.Generic.IEnumerable<System.String>keys
System.Threading.CancellationTokentoken
Type Parameters
  • T

SetAllAsync<T>(IDictionary<String, T>, CancellationToken)

View Source
Declaration
public async Task SetAllAsync<T>(IDictionary<string, T> values, CancellationToken token = default(CancellationToken))
Returns

System.Threading.Tasks.Task

Parameters
TypeName
System.Collections.Generic.IDictionary<System.String,<T>>values
System.Threading.CancellationTokentoken
Type Parameters
  • T

GetTimeToLiveAsync(String, CancellationToken)

View Source
Declaration
public async Task<TimeSpan?> GetTimeToLiveAsync(string key, CancellationToken token = default(CancellationToken))
Returns

System.Threading.Tasks.Task<System.Nullable<System.TimeSpan>>

Parameters
TypeName
System.Stringkey
System.Threading.CancellationTokentoken

RemoveExpiredEntriesAsync(CancellationToken)

View Source
Declaration
public async Task RemoveExpiredEntriesAsync(CancellationToken token = default(CancellationToken))
Returns

System.Threading.Tasks.Task

Parameters
TypeName
System.Threading.CancellationTokentoken

DisposeAsync()

View Source
Declaration
public async ValueTask DisposeAsync()
Returns

ValueTask

GetKeysByPatternAsync(String, CancellationToken)

View Source
Declaration
public async IAsyncEnumerable<string> GetKeysByPatternAsync(string pattern, CancellationToken token = default(CancellationToken))
Returns

IAsyncEnumerable<System.String>

Parameters
TypeName
System.Stringpattern
System.Threading.CancellationTokentoken

Implements