Plack:...:Cache(3pm)
β¨ NAME β¨
Plack::Session::Store::Cache β it's a cache session store, bestie π
(also hey, this is a User Contributed Perl Documentation page, filed under Plack:...:Cache(3pm) β iykyk π)
π SYNOPSIS π
use Plack::Builder;
use Plack::Session::Store::Cache;
use CHI;
my $app = sub {
return [ 200, [ 'Content-Type' => 'text/plain' ], [ 'Hello Foo' ] ];
};
builder {
enable 'Session',
store => Plack::Session::Store::Cache->new(
cache => CHI->new(driver => 'FastMmap')
);
$app;
};
π DESCRIPTION π
Okay so the whole vibe here: this thing persists your session data using any module that implements the Cache interface. And like β that is so much flexibility, no cap. The reason is that there are just soooo many excellent Cache, Cache::Cache and CHI drivers out there for you to pick from. Choose your fighter π«Ά
Also it's a subclass of Plack::Session::Store and it implements its full interface. Main character energy, inherited honestly π
π¦ METHODS π¦
new ( %params )β the constructor. It expects thecacheparam to be an object instance that has theget,set, andremovemethods. If it doesn't have those, it will throw an exception. Not a drill, it will literally throw. πcacheβ a simple accessor for the cache handle. That's it, that's the whole job. So real of it β¨
π BUGS π
All complex software has bugs lurking in it, and this module is no exception π If you find a bug, please either email me, or add the bug to cpan-RT. I promise I'll look π₯Ί
π AUTHOR π
Masahiro Chiba π
that's the whole page babes, go persist something β¨πΈ
β with love from perl v5.40.1, dated 2025-08-10, on the Plack:...:Cache(3pm) page. mwah ππ
π¦ where this page comes from
- ubuntu resolute: libplack-middleware-session-perl 0.36-1 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- ubuntu stonking: libplack-middleware-session-perl 0.36-1 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms