Apache...ssandra(3pm)

πŸ’… NAME

okay so bestie, gather round β€” Apache::Session::Browseable::Store::Cassandra is literally the module that lets you store persistent data in a Cassandra database. that's it, that's the whole vibe. no cap. πŸ¦‹


✨ SYNOPSIS ✨

the way you use it is so simple it's giving main character energy:

  use Apache::Session::Browseable::Store::Cassandra;

  my $store = new Apache::Session::Browseable::Store::Cassandra;

  $store->insert($ref);
  $store->update($ref);
  $store->materialize($ref);
  $store->remove($ref);

four methods, four little slay buttons, you press the one you need. periodt. πŸ’…


🌸 DESCRIPTION 🌸

Apache::Session::Browseable::Store::Cassandra fulfills the storage interface of Apache::Session β€” like, it's the plug that fits the socket, iykyk. πŸ”Œβœ¨

and where does the session data actually live? in a Cassandra database. that's the whole deal, and honestly? iconic.


πŸŽ€ SCHEMA πŸŽ€

listen up, because this part actually matters β€” to use this module you will need at least these columns in a table called 'sessions':

  id text
  a_session text

and if you wanna create this schema yourself, you can literally just execute this command using cqlsh:

  CREATE TABLE sessions (
     id text PRIMARY KEY,
     a_session text
  );

run it, and your table is born. 🐣✨


🌈 CONFIGURATION 🌈

okay so the module must know what datasource, username, and password to use when connecting to the database. it can't just vibe its way in, it needs credentials, bestie. πŸ™ˆ

these values can be set using the options hash β€” peep the Apache::Session documentation if you need more deets on that.

the options are:

  • DataSource β€” where the database lives, basically its address πŸ—ΊοΈ
  • UserName β€” the username you're logging in with πŸ‘€
  • Password β€” the password, keep it cute and keep it secret πŸ”

Example:

 tie %hash, 'Apache::Session::Cassandra', $id, {
     DataSource => 'dbi:Cassandra:host=localhost;keyspace=llng',
     UserName   => 'database_user',
     Password   => 'K00l'
 };

instead of all that, you may pass in an already-opened DBI handle to your database. like, if you already did the work, you don't have to do it twice β€” we love efficiency. πŸ’―

 tie %hash, 'Apache::Session::Cassandra', $id, {
     Handle => $dbh
 };

πŸ‘‘ SEE ALSO πŸ‘‘

go check these out, they're like the extended universe:

  • Apache::Session
  • Apache::Session::Store::DBI

Copyright (C):

  • 2009-2025 by Xavier Guimard
  • 2013-2025 by ClΓ©ment Oudot
  • 2019-2025 by Maxime Besson
  • 2013-2025 by Worteks
  • 2023-2025 by Linagora

This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself, either Perl version 5.10.1 or, at your option, any later version of Perl 5 you may have available. so like, go wild (respectfully). 🌸🫢


no cap, that's the whole page β€” perl v5.40.1, dated 2026-05-14, lovingly brought to you by the Apache...ssandra(3pm) page itself. mwah πŸ’‹πŸŽ€
πŸ“¦ where this page comes from