Mail::...cached(3pm)

πŸ’– Mail::MtPolicyd::SessionCache::Memcached β€” the session cache adapter for memcached πŸ’–

okay bestie, so this is Mail::MtPolicyd::SessionCache::Memcached, part of the User Contributed Perl Documentation collection (that's the manual name, iykyk β€” it shows up in the header as Mail::...cached(3pm) because terminals are dramatic and truncate everything πŸ’…). It's a session cache adapter for memcached. That's it. That's the whole job. And it does it flawlessly.


✨ VERSION ✨

version 2.05 πŸŽ€


πŸ¦‹ SYNOPSIS πŸ¦‹

like, here's the vibe, literally just drop this into your config and go:

<SessionCache>
  module = "Memcached"
  #memcached = "memcached"
  # expire session cache entries
  expire = "300"
  # wait timeout will be increased each time 50,100,150,... (usec)
  lock_wait=50
  # abort after n retries
  lock_max_retry=50
  # session lock times out after (sec)
  lock_timeout=10
</SessionCache>

no notes. it's giving plug and play. 🌸


πŸ’… PARAMETERS πŸ’…

okay so these are the knobs you get to turn, and bestie, every single one of them matters:

  • memcached (default: memcached) β€” this is the name of the database connection you wanna use. super important: you have to define this connection first, like, before you try to use it. don't come crying to me if you skipped that step 😭. see Mail::MtPolicyd::Connection::Memcached for the whole thing.
  • expire (default: 5*60) β€” the timeout for sessions, in seconds. that's it. that's the whole parameter. ⏳
  • lock_wait (default: 50) β€” timeout for retry when a session is locked, in milliseconds. the retry happens in multiples of this timeout, so if you set it to 50, your retries go down at 50, 100, 150ms... like a little staircase of patience πŸͺœ
  • lock_max_retry (default: 50) β€” the maximum number of retries before it gives up trying to obtain a lock on a session. after that it's just like "okay I'm out πŸšͺπŸ’¨".
  • lock_timeout (default: 10) β€” how long session locks last, in seconds. periodt.

πŸ‘‘ AUTHOR πŸ‘‘

Markus Benning <ich@markusbenning.de> β€” the icon, the legend, the moment. 🫢


This software is Copyright (c) 2014 by Markus Benning <ich@markusbenning.de>.

This is free software, licensed under:

The GNU General Public License, Version 2, June 1991

so yeah, free software, GPL v2, June 1991 β€” the classic. slay. πŸ’œ


and that's the whole page, bestie! this doc came to you from perl v5.38.2 and it's dated 2024-05-26 β€” so if you're reading this, know that future-you is thriving. go cache those sessions, you absolute main character πŸŒŸπŸ’–

πŸ“¦ where this page comes from