| 1 |
NAME |
| 2 |
CHI::Driver::Memcached -- Distributed cache via memcached (memory cache |
| 3 |
daemon) |
| 4 |
|
| 5 |
VERSION |
| 6 |
version 0.16 |
| 7 |
|
| 8 |
SYNOPSIS |
| 9 |
use CHI; |
| 10 |
|
| 11 |
my $cache = CHI->new( |
| 12 |
driver => 'Memcached', # or 'Memcached::Fast', or 'Memcached::libmemcached' |
| 13 |
namespace => 'products', |
| 14 |
servers => [ "10.0.0.15:11211", "10.0.0.15:11212", "/var/sock/memcached", |
| 15 |
"10.0.0.17:11211", [ "10.0.0.17:11211", 3 ] ], |
| 16 |
debug => 0, |
| 17 |
compress_threshold => 10_000, |
| 18 |
); |
| 19 |
|
| 20 |
DESCRIPTION |
| 21 |
A CHI driver that uses Cache::Memcached to store data in the specified |
| 22 |
memcached server(s). |
| 23 |
|
| 24 |
CHI::Driver::Memcached::Fast and CHI::Driver::Memcached::libmemcached |
| 25 |
are also available as part of this distribution. They work with other |
| 26 |
Memcached clients and support a similar feature set. Documentation for |
| 27 |
all three modules is presented below. |
| 28 |
|
| 29 |
CONSTRUCTOR OPTIONS |
| 30 |
Namespace, appended with ":", is passed along to the |
| 31 |
Cached::Memcached::* constructor, along with any constructor options not |
| 32 |
recognized by CHI - for example *servers*, *compress_threshold* and |
| 33 |
*debug*. |
| 34 |
|
| 35 |
If you need more control over the options passed to Cache::Memcached::*, |
| 36 |
you may specify a hash directly in `memd_params'. |
| 37 |
|
| 38 |
METHODS |
| 39 |
Besides the standard CHI methods: |
| 40 |
|
| 41 |
memd |
| 42 |
Returns a handle to the underlying Cache::Memcached::* object. You |
| 43 |
can use this to call memcached-specific methods that are not |
| 44 |
supported by the general API, e.g. |
| 45 |
|
| 46 |
$self->memd->incr("key"); |
| 47 |
my $stats = $self->memd->stats(); |
| 48 |
|
| 49 |
UNSUPPORTED METHODS |
| 50 |
These standard CHI methods cannot currently be supported by memcached, |
| 51 |
chiefly because there is no way to get a list of stored keys. |
| 52 |
|
| 53 |
dump_as_hash |
| 54 |
clear |
| 55 |
get_keys |
| 56 |
get_namespaces |
| 57 |
is_empty |
| 58 |
purge |
| 59 |
|
| 60 |
SUPPORT AND DOCUMENTATION |
| 61 |
Questions and feedback are welcome, and should be directed to the |
| 62 |
perl-cache mailing list: |
| 63 |
|
| 64 |
http://groups.google.com/group/perl-cache-discuss |
| 65 |
|
| 66 |
Bugs and feature requests will be tracked at RT: |
| 67 |
|
| 68 |
http://rt.cpan.org/NoAuth/Bugs.html?Dist=CHI-Driver-Memcached |
| 69 |
|
| 70 |
The latest source code can be browsed and fetched at: |
| 71 |
|
| 72 |
http://github.com/jonswar/perl-chi-driver-memcached/tree/master |
| 73 |
git clone git://github.com/jonswar/perl-chi-driver-memcached.git |
| 74 |
|
| 75 |
AUTHOR |
| 76 |
Jonathan Swartz |
| 77 |
|
| 78 |
SEE ALSO |
| 79 |
CHI, Cache::Memcached, CHI::Driver::Memcached::Fast, |
| 80 |
CHI::Driver::Memcached::libmemcached |
| 81 |
|
| 82 |
COPYRIGHT & LICENSE |
| 83 |
Copyright (C) 2007 Jonathan Swartz. |
| 84 |
|
| 85 |
CHI::Driver::Memcached is provided "as is" and without any express or |
| 86 |
implied warranties, including, without limitation, the implied |
| 87 |
warranties of merchantibility and fitness for a particular purpose. |
| 88 |
|
| 89 |
This program is free software; you can redistribute it and/or modify it |
| 90 |
under the same terms as Perl itself. |
| 91 |
|
| 92 |
COPYRIGHT AND LICENSE |
| 93 |
This software is copyright (c) 2011 by Jonathan Swartz. |
| 94 |
|
| 95 |
This is free software; you can redistribute it and/or modify it under |
| 96 |
the same terms as the Perl 5 programming language system itself. |
| 97 |
|