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


Cache-Memcached-AnyEvent documentation  | view source Contained in the Cache-Memcached-AnyEvent distribution.

Index


NAME

Top

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

SYNOPSIS

Top

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

DESCRIPTION

Top

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

Top

$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


Cache-Memcached-AnyEvent documentation  | view source Contained in the Cache-Memcached-AnyEvent distribution.