Daisuke Maki > Data-Valve > Data::Valve::BucketStore::Memcached

Download:
Data-Valve-0.00010.tar.gz

Dependencies

Annotate this POD

CPAN RT

New  1
Open  0
View/Report Bugs
Source  

NAME ^

Data::Valve::BucketStore::Memcached - Memcached Backend

DESCRIPTION ^

Data::Valve::BucketStore::Memcached uses Memcached as its storage backend, and allows multiple processes to work together.

You need to specify a memcached server in order for t to work:

  Data::Valve->new(
    bucket_store => {
      module => "Memcached",
      args => {
        store => {
          servers => [ '127.0.0.1:11211' ],
          namespace => ...
        }
      }
    }
  );

This module also provides locking mechanism by means of KeyedMutex. You should specify one at construction time:

  Data::Valve->new(
    bucket_store => {
      module => "Memcached",
      args   => {
        mutex => {
          args => {
            sock => "host:port" # <-- here
          }
        }
      }
    }
  );

This allows all coordinating processes to share the same mutex, and you will get "correct" throttling information

METHODS ^

try_push

reset

syntax highlighting: