CHI::D...cached(3pm)
π NAME π
CHI::Driver::Memcached β distributed cache via memcached (the memory cache daemon) β¨
okay so quick vibe check: this is the CHI driver that lets you stash your stuff in memcached, and the docs for it live in the CHI::D...cached(3pm) manual page under User Contributed Perl Documentation. bestie, it's giving distributed cache realness π
πΈ VERSION πΈ
version 0.16
β¨ SYNOPSIS β¨
use CHI;
my $cache = CHI->new(
driver => 'Memcached', # or 'Memcached::Fast', or 'Memcached::libmemcached'
namespace => 'products',
servers => [ "10.0.0.15:11211", "10.0.0.15:11212", "/var/sock/memcached",
"10.0.0.17:11211", [ "10.0.0.17:11211", 3 ] ],
debug => 0,
compress_threshold => 10_000,
);
that's it. that's the whole setup. slay π«Ά
π¦ DESCRIPTION π¦
so this is a CHI driver that uses Cache::Memcached to store data in the memcached server(s) you specify. no cap.
also available as part of this same distribution:
- CHI::Driver::Memcached::Fast
- CHI::Driver::Memcached::libmemcached
those two work with other Memcached clients and support a similar feature set. and literally all three modules' docs are right here below. one stop shop, we love to see it π
π CONSTRUCTOR OPTIONS π
the namespace, appended with ":", gets passed along to the Cached::Memcached::* constructor β plus any constructor options that CHI doesn't recognize, like, for example, servers, compress_threshold and debug.
not me accidentally typo'ing nothing, that Cached::Memcached::* is exactly what the page says, don't come for me π
and if you need more control over what gets passed to Cache::Memcached::*? you can just hand it a hash directly via "memd_params". iconic.
π METHODS π
on top of the standard CHI methods, you also get:
memdβ hands you back a handle to the underlyingCache::Memcached::*object π«΄ so you can call memcached-specific methods that the general API just does not support, e.g.
$self->memd->incr("key");
my $stats = $self->memd->stats();
main character energy fr fr.
π UNSUPPORTED METHODS π
these standard CHI methods cannot currently be supported by memcached β chiefly because there's literally no way to get a list of stored keys π like, the keys are just... gone, bestie.
dump_as_hashclearget_keysget_namespacesis_emptypurge
π SUPPORT AND DOCUMENTATION π
questions and feedback? welcome π and they should be directed to the perl-cache mailing list:
http://groups.google.com/group/perl-cache-discuss
bugs and feature requests get tracked at RT:
http://rt.cpan.org/NoAuth/Bugs.html?Dist=CHI-Driver-Memcached
and the latest source code can be browsed and fetched at:
http://github.com/jonswar/perl-chi-driver-memcached/tree/master
git clone git://github.com/jonswar/perl-chi-driver-memcached.git
π AUTHOR π
Jonathan Swartz β¨
π SEE ALSO π
CHI, Cache::Memcached, CHI::Driver::Memcached::Fast, CHI::Driver::Memcached::libmemcached
go read them, iykyk π
π COPYRIGHT & LICENSE π
Copyright (C) 2007 Jonathan Swartz.
CHI::Driver::Memcached is provided "as is" and without any express or implied warranties, including, without limitation, the implied warranties of merchantibility and fitness for a particular purpose.
β οΈ yes that means no warranty bestie, it's on you, don't @ me
This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself.
π COPYRIGHT AND LICENSE π
This software is copyright (c) 2011 by Jonathan Swartz.
This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself.
and that's the whole page, bestie π§ this lil doc came to you via perl v5.36.0, dated 2022-10-16, and the manual page itself is CHI::D...cached(3pm). mwah, go cache something ππ
π¦ where this page comes from
- ubuntu noble: libchi-driver-memcached-perl 0.16-2 Β· Artistic-1.0-Perl
- ubuntu resolute: libchi-driver-memcached-perl 0.16-2 Β· Artistic-1.0-Perl
- ubuntu stonking: libchi-driver-memcached-perl 0.16-2 Β· Artistic-1.0-Perl
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms