The London Perl and Raku Workshop takes place on 26th Oct 2024. If your company depends on Perl, please consider sponsoring and/or attending.

NAME

Mojolicious::Sessions::ThreeS::Storage::CHI - An adapter to store sessions in a CHI instance.

SYNOPSIS

  my $storage = Mojolicious::Sessions::ThreeS::Storage::CHI->new({ chi => .. a CHI instance .. });

  # Use $storage in the Mojolicious::Sessions::ThreeS instance (or through the plugin):

  $app->sessions( Mojolicious::Sessions::ThreeS->new({ storage => $storage , state => ... } );

Note that you WILL have to depend on CHI and on JSON in your application to use this storage.

This distribution does not add these to the runtime dependencies to avoid clutter.

ATTRIBUTES

default_expiration

Default expiration length (in seconds) in case you dont define a default session expiration at higher level. This is required to avoid CHI cache overflowing.

Defaults to 43200 (12 hours).

METHODS

get_session

See Mojolicious::Sessions::ThreeS::Storage

store_session

See Mojolicious::Sessions::ThreeS::Storage

remove_session_id

See Mojolicious::Sessions::ThreeS::Storage