AnyEve...ithNext(3pm)

πŸ“¦
version 0.08 Β· 2 versions
  • 0.08 Β· debian bookworm, debian trixie, ubuntu noble, ubuntu resolute, ubuntu stonking (latest)
  • 0.08 Β· ubuntu jammy
, in debian bookworm, debian trixie, ubuntu noble, ubuntu resolute, ubuntu stonking

πŸ’– AnyEve...ithNext(3pm) β€” like, the whole vibe πŸ’–

okay bestie, pull up a chair 🫢 this is the manpage for AnyEvent::Memcached::Hash::WithNext, living its best life in section 3pm (that's Perl module docs, iykyk). It's a hashing algorythm for AE::Memcached β€” and yes, that's literally how it's spelled up top, we don't gatekeep spelling around here ✨


🌸 NAME 🌸

AnyEvent::Memcached::Hash::WithNext β€” a hashing algorythm for AE::Memcached. no cap, that's the whole name, that's the whole job πŸ’…


✨ SYNOPSIS ✨

here's the tea, copy-paste ready:

    my $memd = AnyEvent::Memcached->new(
        servers => [ "10.0.0.15:10001", "10.0.0.15:10002", "10.0.0.15:10003" ],
        # ...
        hasher  => 'AnyEvent::Memcached::Hash::WithNext',
    );
    $memd->set(key => "val", ...) # will put key on 2 servers

see that last line? πŸ‘€ one set, two servers. that's the whole personality of this module right there.


πŸ¦‹ DESCRIPTION πŸ¦‹

so the way that this works is: it uses the same hashing, as default β€” like, the exact same one you'd get if you didn't pass a hasher at all β€” but then it always put key to server, next after chosen.

translation for the group chat: it picks your server like normal, then it also drops the key on the next one in line. the result? twice-replicated data. two copies, no extra effort, main character energy πŸŽ€

and the point of all that doubling up? it's useful for usage with memcachdb. that's it, that's the reason, go forth and replicate πŸ”₯


πŸ‘‘ AUTHOR πŸ‘‘

Mons Anderson, "<mons at cpan.org>". absolute icon, we stan πŸ’œ


and that's a wrap, bestie 🌈 this lil page came from the User Contributed Perl Documentation, running on perl v5.34.0, dated 2022-06-06. mwah, go replicate something πŸ’‹πŸ’–

πŸ“¦ where this page comes from