Daisuke Maki
and 1 contributors

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