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 the cache param to be an object instance that has the get, set, and remove methods. 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