Cache::Memcached::libmemcached

Perl Interface to libmemcached
Download

Cache::Memcached::libmemcached Ranking & Summary

Advertisement

  • Rating:
  • License:
  • Perl Artistic License
  • Publisher Name:
  • Daisuke Maki
  • Publisher web site:
  • http://search.cpan.org/~dmaki/

Cache::Memcached::libmemcached Tags


Cache::Memcached::libmemcached Description

Perl Interface to libmemcached Cache::Memcached::libmemcached is the Cache::Memcached compatible interface to libmemcached, a C library to interface with memcached.Cache::Memcached::libmemcached is built on top of Memcached::libmemcached. While Memcached::libmemcached aims to port libmemcached API to perl, Cache::Memcached::libmemcached attempts to be API compatible with Cache::Memcached, so it can be used as a drop-in replacement.Note that as of version 0.02000, Cache::Memcached::libmemcached inherits from Memcached::libmemcached. While you are free to use the Memcached::libmemcached specific methods directly on the object, you should use them with care, as it will mean that your code is no longer compatible with the Cache::Memcached API therefore losing some of th portability in case you want to replace it with some other package.SYNOPSIS use Cache::Memcached::libmemcached; my $memd = Cache::Memcached::libmemcached->new({ servers => , compress_threshold => 10_000 }); $memd->set("my_key", "Some value"); $memd->set("object_key", { 'complex' => }); $val = $memd->get("my_key"); $val = $memd->get("object_key"); if ($val) { print $val->{complex}-> } $memd->incr("key"); $memd->decr("key"); $memd->incr("key", 2); $memd->delete("key"); $memd->remove("key"); # Alias to delete my $hashref = $memd->get_multi(@keys); # Constants - explicitly by name or by tags # see Memcached::libmemcached::constants for a list use Cache::Memcached::libmemcached qw(MEMCACHED_DISTRIBUTION_CONSISTENT); use Cache::Memcached::libmemcached qw( :defines :memcached_allocated :memcached_behavior :memcached_callback :memcached_connection :memcached_hash :memcached_return :memcached_server_distribution ); # Extra constructor options that are not in Cache::Memcached # See Memcached::libmemcached::constants for a list of available options my $memd = Cache::Memcached::libmemcached->new({ ..., no_block => $boolean, distribution_method => $distribution_method, hashing_algorithm => $hashing_algorithm, }); Requirements: · Perl


Cache::Memcached::libmemcached Related Software