Using MySQL and memcached with Perl
The Cache::Memcached module provides a native interface to the Memcache protocol, and provides
support for the core functions offered by memcached. Install the module using your operating system's
package management system, or using CPAN:
root-shell perl -MCPAN -e 'install Cache::Memcached'
To use memcached from Perl through the Cache::Memcached module, first create a new
Cache::Memcached object that defines the list of servers and other parameters for the connection.
The only argument is a hash containing the options for the cache interface. For example, to create a
new instance that uses three memcached servers:
use Cache::Memcached;
my $cache = new Cache::Memcached {
'servers' = [
'192.168.0.100:11211',
'192.168.0.101:11211',
'192.168.0.102:11211',
],
};
... zobacz całą notatkę
Komentarze użytkowników (0)