memcache


Using Memcached with Perl

First of all, install the Memcached for Perl: perl -MCPAN -e shell install Cache::Memcached Here is an example script: #!/usr/bin/perl use Cache::Memcached; my $cache =  new Cache::Memcached {     'servers' => [‘127.0.0.1:11211’],  }; # Save (set) something in your cache: $cache->set("test", "test123"); # Get the value from Memcached my $value = $cache->get("test");   


Installing Memcached with Replication (repcached)

First install the needed packages: apt-get install gcc make build-essential libevent-dev libevent-1.4-2 libevent-core-1.4-2 Go here to download the repcached package: http://sourceforge.net/projects/repcached/files/latest/download?source=files You can also find it here. Unpack and install it: tar -xvpf memcached-1.2.8-repcached-2.2.tar.gz ./configure –enable-replication make make install Next you should set up the configuration file for memcached /etc/default/memcachedrep with the following content: DAEMON_ARGS="-m 512 -p […]


Storing your PHP sessions using Memcached

Memcached is a high-performance, distributed memory object caching system. Many big well-known sites use it to store their PHP sessions in a centralized way and to reduce the load on their servers.   Installation with Apache2 and PHP5 on Debian:  Install these packages (if memcached is on a different server, omit the package): apt-get install memcached php5-memcached […]