Cache::Ehcache - client library for Ehcache Server
use Cache::Ehcache; my $cache = Cache::Ehcache->new({ 'server' => 'http://localhost:8080/ehcache/rest/', 'namespace' => 'mynamespace', 'default_expires_in' => 600, # option }); # set cache element $cache->set('key_1', 'value_1'); $cache->set('key_2', 'value_2', 3600); # specify expires_in # get cache element my $value = $cache->get('key_1'); # URL is 'http://localhost:8080/ehcache/rest/mynamespace/key_1' # delete cache element $cache->delete('key_2'); # remove all elements of this cache $cache->clear();
Cache::Ehcache is client library for Ehcache Server. Ehcache is a widely used java distributed cache for general purpose caching. Ehcache Server is caching server like memcached, and has RESTful resource oriented API.
See: http://ehcache.sourceforge.net/documentation/cache_server.html
YAMAMOTO Ryuzo (dragon3) <ryuzo.yamamoto@gmail.com>
This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself .
Ehcache Site http://ehcache.sourceforge.net/index.html,
Ehcache Server http://ehcache.sourceforge.net/documentation/cache_server.html
To install Cache::Ehcache, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Cache::Ehcache
CPAN shell
perl -MCPAN -e shell install Cache::Ehcache
For more information on module installation, please visit the detailed CPAN module installation guide.