Scroll to navigation

AnyEvent::Memcached::Hash::WithNext(3pm) User Contributed Perl Documentation AnyEvent::Memcached::Hash::WithNext(3pm)

NAME

AnyEvent::Memcached::Hash::WithNext - Hashing algorythm for AE::Memcached

SYNOPSIS

    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

DESCRIPTION

Uses the same hashing, as default, but always put key to server, next after chosen. Result is twice-replicated data. Useful for usage with memcachdb

AUTHOR

Mons Anderson, "<mons at cpan.org>"
2016-12-28 perl v5.24.1