Struct actix_redis::RedisSessionBackend [] [src]

pub struct RedisSessionBackend(_);

Use redis as session storage.

You need to pass an address of the redis server and random value to the constructor of RedisSessionBackend. This is private key for cookie session, When this value is changed, all session data is lost.

Note that whatever you write into your session is visible by the user (but not modifiable).

Constructor panics if key length is less than 32 bytes.

Methods

impl RedisSessionBackend
[src]

[src]

Create new redis session backend

  • addr - address of the redis server

[src]

Set time to live in seconds for session value

[src]

Set custom cookie name for session id

Trait Implementations

impl<S> SessionBackend<S> for RedisSessionBackend
[src]

[src]

Parse the session from request and load data from a storage backend.

Auto Trait Implementations