ISessionAsync
A Users Session
Assembly: ServiceStack.Interfaces.dll
View Source
Declaration
public interface ISessionAsync
Methods
SetAsync<T>(String, T, CancellationToken)
Set a typed value at key
View Source
Declaration
Task SetAsync<T>(string key, T value, CancellationToken token = default(CancellationToken))
Returns
System.Threading.Tasks.Task
Parameters
Type | Name |
---|---|
System.String | key |
<T> | value |
System.Threading.CancellationToken | token |
Type Parameters
T
GetAsync<T>(String, CancellationToken)
Get a typed value at key
View Source
Declaration
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
RemoveAsync(String, CancellationToken)
Remove the value at key
View Source
Declaration
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(CancellationToken)
Delete all Cache Entries (requires ICacheClient that implements IRemoveByPattern)
View Source
Declaration
Task RemoveAllAsync(CancellationToken token = default(CancellationToken))
Returns
System.Threading.Tasks.Task
Parameters
Type | Name |
---|---|
System.Threading.CancellationToken | token |