Skip to main content

Module sessions

Module sessions 

Source
Expand description

§User Variable Session Adapters

This module provides the trait and the default in-memory session adapter for storing user variables.

In RiveScript, users are identified by their username which is passed in to the reply() function. Variables about the user which are set using tags like <set> or {topic} are stored in a User Variable Session Adapter.

The default is to keep user variables in memory using HashMaps, and they can be exported and re-imported using functions like get_uservars() and set_uservars(). However, you may prefer to more proactively store user variables directly into something like a Redis cache or SQL database instead. The SessionManager trait from this module may allow you to do so.

Modules§

memory

Structs§

History

Enums§

ThawAction
What to do with frozen user variables after a thaw?

Traits§

SessionManager