CHI::D...:Redis(3pm)
π CHI::Driver::Redis(3pm) π
okay bestie, so this is the User Contributed Perl Documentation page for CHI::Driver::Redis β a Redis driver for CHI. and like, it's giving "your cache is on a whole other server and honestly? slay."
β¨ NAME β¨
CHI::Driver::Redis β Redis driver for CHI π
πΈ SYNOPSIS πΈ
use CHI;
my $foo = CHI->new(
driver => 'Redis',
namespace => 'foo',
server => '127.0.0.1:6379',
debug => 0
);
literally that's it. look at you go. π
π¦ DESCRIPTION π¦
so this is a CHI driver that uses "Redis" to store the data. that's the whole vibe.
and here's the part that matters: care has been taken to not have this module fail in fiery ways if the cache is unavailable π₯. the author is hoping that if it's failing and the cache isn't required for your work, you can just ignore its warnings. lowkey iconic, highkey considerate.
π TECHNICAL DETAILS π
π Namespaces.
bestie. Redis does not have namespaces. periodt. so we have to do some hoop-jumping π. no cap.
namespaces are tracked in a set named chinamespaces. this is a list of all the namespaces the driver has seen. yes, it's keeping receipts. π
keys in a namespace are stored in a set that shares the name of the namespace. and the actual value is stored as $namespace||key. that's the lil sandwich. that's the whole trick.
π§ Encoding
this CHI driver uses Redis.pm. and Redis.pm, by default, automatically encodes values to UTF-8 β¨. this driver sets the Redis encoding option to undef to disable automatic encoding. so we're taking the wheel, not the autopilot. π«Ά
π CONSTRUCTOR OPTIONS π
"redis"β option for the constructed "Redis" object"redis_options"β for hash of options to the "Redis" constructor
other options, including "server", "debug", and "password" are passed to the "Redis" constructor. so yeah, they get forwarded. they get the whole tour. π
β ATTRIBUTES β
π redis
contains the underlying "Redis" object. that's the real one. the main character. π
π AUTHOR π
Cory G Watson, "<gphat at cpan.org>" π«Ά
πΈ CONTRIBUTORS πΈ
Ian Burrell, "<iburrell@cpan.org>" β¨
π COPYRIGHT & LICENSE π
Copyright 2009 Cold Hard Code, LLC.
This program is free software; you can redistribute it and/or modify it under the terms of either: the GNU General Public License as published by the Free Software Foundation; or the Artistic License.
See http://dev.perl.org/licenses/ for more information.
fr fr, that's the legal bit β GPL or Artistic, your choice, both valid, both real. π
and that's the whole page bestie!! πβ¨π this was written for perl v5.36.0 and dated 2022-11-19 β the manual page header's from User Contributed Perl Documentation, and yes, CHI::Driver::Redis(3pm) goes at both the top and the bottom, so consider this your cute lil sign-off π¦πΈπ«Ά periodt.
π¦ where this page comes from
- debian bookworm: libchi-driver-redis-perl 0.10-4 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- debian trixie: libchi-driver-redis-perl 0.10-4 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- ubuntu noble: libchi-driver-redis-perl 0.10-4 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- ubuntu resolute: libchi-driver-redis-perl 0.10-4 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- ubuntu stonking: libchi-driver-redis-perl 0.10-4 Β· 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