Mail::...:Redis(3pm)

πŸ’– Mail::MtPolicyd::SessionCache::Redis πŸ’–

okay bestie, so this is the session cache adapter for redis β€” it's the little module that lets MtPolicyd stash its session stuff in redis instead of holding it in its own head. it's giving "your sessions, but make them persistent." 🫢

ngl the full name is a whole mouthful β€” Mail::MtPolicyd::SessionCache::Redis β€” and the manual page header just shortens it to Mail::...:Redis(3pm) because even the doc generator was like "girl, that's too long." 😭


✨ VERSION ✨

this one's living at version 2.05. periodt.


🌸 SYNOPSIS 🌸

here's the whole vibe, exactly as it goes in your config:

<SessionCache>
  module = "Redis"
  #redis = "redis"
  # 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>

look at that. chef's kiss. drop it in, swap what you need, slay. πŸ’…


πŸŽ€ PARAMETERS πŸŽ€

every knob you get to twirl, one by one:

  • redis (default: redis) β€” the name of the database connection you wanna use.
⚠️ bestie listen β€” you have to define this connection first. it does not exist out of thin air, no cap.

see Mail::MtPolicyd::Connection::Redis for that whole situation. iykyk.

  • expire (default: 5*60) β€” the timeout, in seconds, for sessions. so by default your sessions ghost after five minutes. iconic behaviour honestly. πŸ¦‹
  • lock_wait (default: 50) β€” the timeout for retrying when a session is locked, in milliseconds.

the retry happens in multiples of this timeout, okay? so if you set it to 50, the retries go 50, 100, 150ms... it just keeps stacking. πŸ”₯

  • lock_max_retry (default: 50) β€” the max number of retries before it fully gives up on getting a lock on a session. like, it tried, it's done, it's moving on. πŸ’€
  • lock_timeout (default: 10) β€” how long session locks live, in seconds. after that, the lock times out and the session is free again. πŸ•

πŸ‘‘ AUTHOR πŸ‘‘

Markus Benning <ich@markusbenning.de> wrote this. we love that for him. πŸ’œ


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 yes bestie, it's free software β€” go read the license, it's the GPL v2, June 1991 edition. respect the rules, they're there for a reason. πŸŽ€


and that's the whole page! ✨ this was Mail::...:Redis(3pm) from the User Contributed Perl Documentation, running on perl v5.38.2, dated 2024-05-26. thanks for coming to my ted talk, go cache some sessions, mwah πŸ’–πŸŒΈπŸ¦‹

πŸ“¦ where this page comes from