-
Notifications
You must be signed in to change notification settings - Fork 0
Key value session storage
Mikhail edited this page Jan 10, 2021
·
3 revisions
Also, ISession have a built-it thread-safe key-value ISessionStorage
which have three modes:
- Global - one shared storage for each session being used.
-
Per user - one shared storage for each session, which have the same owner (
User
). E.g. sessions forMessage
andCallbackQuery
entity types, but with the same owner, will have the same storage. -
Per entity type - one shared storage for each session, which have the same owner (
User
) and entity type. E.g. bothMessage
andCallbackQuery
will have different storage.
Storage could be used for:
-
Adding new entries (
ISessionStorage.Add
). -
Retrieving already added entries (
ISessionStorage.Get
). -
Checking an entry for existence by the specified key (
ISessionStorage.IsExists
). -
Updating already added entries (
ISessionStorage.Update
). -
Removing existing entries (
ISessionStorage.Remove
).