Apache...NoLock(3pm)
π Apache::Session::MySQL::NoLock π
okay bestie, so this is the User Contributed Perl Documentation page for Apache::Session::MySQL::NoLock β an implementation of Apache::Session::MySQL with no locking. Yes, you read that right. No locking. We'll get to the screaming part in a sec π
β¨ NAME β¨
Apache::Session::MySQL::NoLock β an implementation of Apache::Session::MySQL without locking. That's the whole vibe. That's the whole module. π«Ά
πΈ SYNOPSIS πΈ
First, bestie, you gotta pull it in:
use Apache::Session::MySQL::NoLock;
#if you want Apache::Session to open new DB handles:
tie %hash, 'Apache::Session::MySQL::NoLock', $id, {
DataSource => 'dbi:mysql:sessions',
UserName => $db_user,
Password => $db_pass,
};
#or, if your handles are already opened:
tie %hash, 'Apache::Session::MySQL::NoLock', $id, {
Handle => $dbh,
};
Two paths, same destination: either you let Apache::Session open shiny new DB handles for you, or you hand it handles you already opened. Your call, main character. π
And if you're trying to configure the non-locking session store in RT (which, ngl, is literally what the author uses this module for), drop this into your RT_SiteConfig.pm module:
Set($WebSessionClass , 'Apache::Session::MySQL::NoLock');
That's it. That's the config. Slay. β¨
π DESCRIPTION π
So here's the tea: this module is an implementation of Apache::Session. It uses the MySQL backing store and the Null locking scheme. That's the combo. π
For the full rundown, peep the example above, plus the documentation for Apache::Session::Store::MySQL β that's where the extra details live. iykyk π
π¨ WARNING π¨
okay bestie, sit down, we need to talk. π«’
This module explicitly DOES NOT DO ANY LOCKING. That is not a typo, that is not a bug, that is the entire personality of this module.
Which means, fr fr: your session data can get overwritten, or stale data can be read by subsequent requests. π
And in case that wasn't loud enough:
This CAN CAUSE LARGE PROBLEMS IN YOUR APPLICATION.
like, LARGE large. Capital letters large. Don't say nobody warned you, bestie. π
π AUTHOR π
This module was written by Tomas Doran <bobtfish@bobtfish.net>. Iconic behavior, honestly. π
π SEE ALSO π
Go read these next, bestie, they're the whole friend group:
Apache::Session::MySQLApache::Session::FlexApache::Session
and that's a wrap! this lil page came to you from perl v5.36.0, dated 2022-11-19, filed under Apache...NoLock(3pm) in the User Contributed Perl Documentation collection. stay safe out there, and maybe think about locking. πβ¨π¦
π¦ where this page comes from
- debian bookworm: libapache-session-perl 1.94-2 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- debian trixie: libapache-session-perl 1.94-2 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- ubuntu noble: libapache-session-perl 1.94-2 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- ubuntu resolute: libapache-session-perl 1.94-2 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- ubuntu stonking: libapache-session-perl 1.94-2 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms