Cache::KyotoTycoon is a client library for KyotoTycoon. KyotoTycoon is pretty fast, stable, and extensible. It's very good cache server for web applications.
use Cache::KyotoTycoon;
my $kt = Cache::KyotoTycoon->new(host => '127.0.0.1', port => 1978);
$kt->set('foo' => bar');
$kt->get('foo'); # => 'bar'