Apache...mcached(3pm)

πŸ’– NAME πŸ’–

Apache::Session::Store::Memcached β€” bestie, it stores ur persistent data using memcached (the memory cache daemon) so that Apache::Session storage can do its lil thing ✨


🌸 SYNOPSIS 🌸

okay so here's the vibe, literally copy-paste this:

tie %session, 'Apache::Session::Memcached', $sid, {
   Servers => '10.0.0.1:20000 10.0.0.2:20000',
   NoRehash => 1,
   Readonly => 0,
   Debug => 1,
   CompressThreshold => 10_000
};

# use with another locking/generation/serializaion scheme

use Apache::Session::Flex;

tie %session, 'Apache::Session::Flex', $id, {
   Store     => 'Memcached',
   Lock      => 'Null',
   Generate  => 'MD5',
   Serialize => 'Storable',
   Servers => '10.0.0.1:20000 10.0.0.2:20000',
};

like… u can also pair it with a whole other locking/generation/serialization situation if that's more ur energy πŸ¦‹


✨ DESCRIPTION ✨

Apache::Session::Store::Memcached implements the storage interface for Apache::Session, using Cache::Memcached as the frontend to memcached. it's giving "middleware but make it cute" fr fr πŸ’…


πŸŽ€ CONFIGURATIONS πŸŽ€

so this module wants to know the standard options for Cache::Memcached. u can pass those options straight through as Apache::Session's tie options, like this:

tie %session, 'Apache::Session::Memcached', $sid, {
   Servers => '10.0.0.1:20000 10.0.0.2:20000',
   Debug => 1
};
heads up bestie: the spelling of the options here is slightly different from the ones in Cache::Memcached. not a typo, that's just how it is πŸ’€

the options 'Servers', 'NoRehash', 'Readonly', 'Debug' and 'CompressThreshold' correspond to the Cache::Memcached parameters 'servers', 'no_rehash', 'readonly', 'debug' and 'compress_threshold'. 🫢

and lowkey extra: 'Server' can be either a scalar shaped like 'IP:port IP:port ...', or an arrayref of hosts (as required by Cache::Memcached). main character energy, it does both πŸ‘‘

go read Cache::Memcached for the details, iykyk πŸ“–


🌈 SEE ALSO 🌈

  • Apache::Session
  • Apache::Session::Flex
  • Cache::Memcached
  • memcached

πŸ‘‘ AUTHOR πŸ‘‘

Enrico Sorcinelli <enrico at sorcinelli>


Copyright (C) 2004 by Enrico Sorcinelli

This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself, either Perl version 5.8.1 or, at your option, any later version of Perl 5 you may have available.


okay that's the whole thing bestie, no notes πŸ’– this was perl v5.30.3, dated 2020-09-06, straight outta the Apache...mcached(3pm) user contributed perl documentation 🌸 slay, go tie some sessions πŸŽ€

πŸ“¦ where this page comes from