Group
Extension

Matches 1

Mojolicious-Plugin-SessionStorage ( W/WF/WFSO/Mojolicious-Plugin-SessionStorage-0.1.6.tar.gz, WFSO, 2018; MetaCPAN )
Mojolicious-Plugin-SessionStorage/lib/Mojolicious/Service/SessionFile.pm ( view source; MetaCPAN )
ge Mojolicious::Service::SessionFile;
use Mojo::Base 'Mojolicious::Service';

use Mojo::JSON qw/from_json to_json/;
use Mojo::File 'path';
use Encode qw/decode_utf8 encode_utf8/;
use Mojo::Cache;

has
 my $file_content = -e $file ? $file->slurp : undef;
    if($file_content){
      $session = from_json(decode_utf8 $file_content);
      # 从session文件中取到后需要设置缓存
      $self->c
ft;
  my $home = $self->app->home;
  $home->child($self->path, $session_id)->spurt(encode_utf8(to_json($session)));
  # 存储session文件后需要设置缓存
  $self->cache->set($session_id => $ses

Powered by Groonga
Maintained by Kenichi Ishigaki <ishigaki@cpan.org>. If you find anything, submit it on GitHub.