Daisuke Maki > Cache-Memcached-AnyEvent > Cache::Memcached::AnyEvent::Selector::Traditional

Download:
Cache-Memcached-AnyEvent-0.00021.tar.gz

Dependencies

Annotate this POD

CPAN RT

Open  0
View/Report Bugs
Source   Latest Release: Cache-Memcached-AnyEvent-0.00022

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

syntax highlighting: