NAME

Cache::Memcached::AnyEvent::Selector::Traditional - Traditional Server Selection Algorithm (ala Cache::Memcached)

SYNOPSIS

use Cache::Memcached::AnyEvent;
my $memd = Cache::Memcached::AnyEvent->new({
    ...
    selector_class => 'Traditional', # Default, so you can omit
});

DESCRIPTION

Implements the default server selection mechanism, as implemented by Cache::Memcached. You do not need to explicitly specify this, as this is the default selector.

METHODS

$class->new( memcached => $memd )

Constructor.

$selector->set_servers( @servernames )

Called when a new server set is given.

$handle = $selector->get_handle( $key )

Returns the AnyEvent handle that is responsible for handling $key

$hash = $selector->hashkey( $key )

Returns the hash value for key $key