Search⌘ K
AI Features

Session Drivers and Methods

Explore how to manage session data in AdonisJs by learning about different session drivers including cookie, file, and Redis. Understand key session methods such as adding, retrieving, and clearing session data, enabling you to handle user sessions effectively within your applications.

Session drivers

A session driver defines where session data will be stored. There are three types of session drivers in AdonisJs: cookie, file, and Redis. Cookie keeps session values in encrypted cookies, File saves session values in a file on a server, and Redis holds sessions values in Redis. By default, the cookie session driver is selected.

Session methods

The following are some useful ...