Oracle 5.0 Reference Manual page 1388

Table of Contents

Advertisement

Hello world
shell> memrm --servers=localhost hwkey
shell> memcat --servers=localhost hwkey
• memslap: Test the load on one or more
operations. For example, you can simulate the load of 100 clients performing get operations:
shell> memslap --servers=localhost --concurrency=100 --flush --test=get
memslap --servers=localhost --concurrency=100 --flush --test=get Threads connecting to servers 100
Took 13.571 seconds to read data
• memflush: Flush (empty) the contents of the
shell> memflush --servers=localhost
15.6.3.4. Using MySQL and
The
Cache::Memcached
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
Cache::Memcached
The only argument is a hash containing the options for the cache interface. For example, to create a
new instance that uses three
use Cache::Memcached;
my $cache = new Cache::Memcached {
'servers' => [
'192.168.0.100:11211',
'192.168.0.101:11211',
'192.168.0.102:11211',
],
};
You can set additional properties on the cache object instance when it is created by specifying the
option as part of the option hash. Alternatively, you can use a corresponding method on the instance:
servers
should be a reference to an array of servers, with each element as the address and port number
combination (separated by a colon). You can also specify a local connection through a UNIX socket
(for example /tmp/sock/memcached). To specify the server with a weight (indicating how much
more frequently the server should be used during hashing), specify an array reference with the
memcached
compress_threshold
values are compressed. Values larger than the specified number are automatically compressed
(using zlib) during storage and retrieval.
no_rehash
unavailable.
readonly
Developing a
memcached
module provides a native interface to the Memcache protocol, and provides
from Perl through the
object that defines the list of servers and other parameters for the connection.
memcached
Note
When using the
automatically performs certain operations across all the servers in the group.
For example, getting statistical information through
returns a hash that contains data on a host-by-host basis, as well as
generalized statistics for all the servers in the group.
or method set_servers(): Specifies the list of the servers to be used. The servers list
server instance and a weight number. Higher numbers give higher priority.
or method set_compress_threshold(): Specifies the threshold when
or method set_norehash(): Disables finding a new server if the original choice is
or method set_readonly(): Disables writes to the
Application
memcached
servers, simulating get/set and multiple client
memcached
memcached
with Perl
Cache::Memcached
servers:
interface with multiple servers, the API
Cache::Memcached
1368
cache.
module, first create a new
Cache::Memcached
servers.
memcached

Advertisement

Table of Contents
loading

This manual is also suitable for:

Mysql 5.0

Table of Contents