Skip to main content

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
TypeName
System.Stringkey
<T>value
System.Threading.CancellationTokentoken
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
TypeName
System.Stringkey
System.Threading.CancellationTokentoken
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
TypeName
System.Stringkey
System.Threading.CancellationTokentoken

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
TypeName
System.Threading.CancellationTokentoken