Memcached is a distributed cache system. It was originally named danga.
Interactive was developed for livejournal, but is currently used by many software such as mediawiki. This is a set of open-source software that is licensed by BSD license. With the development of distributed computing, it is more and more difficult to obtain consistent computing results when the memory is consistent between machines. With the development of the machine's geometric level, centralized cache becomes increasingly available. Javaframework2.5 has also integrated centralized cache operations.
Package COM. shine. framework. memcached. example; import COM. shine. framework. memcached. memcachedmanager; public class memcachedmanagerbasetest {/*** @ Param ARGs */public static void main (string [] ARGs) {// initialize the centralized cache system memcachedmanager. getmanager (). addmemcachepool ("cache", "192.168.2.212: 11211"); // Add the specified data to the cache's centralized cache memcachedmanager. getmanager (). add ("cache", "test", "test"); // print the retrieved centralized cache data system. out. println (memcachedmanager. getmanager (). get ("cache", "test"); // replaces memcachedmanager. getmanager (). replace ("cache", "test", "replace"); // print the retrieved centralized cache data system. out. println (memcachedmanager. getmanager (). get ("cache", "test"); // replaces memcachedmanager. getmanager (). delete ("cache", "test"); // print the retrieved centralized cache data system. out. println (memcachedmanager. getmanager (). get ("cache", "test "));}}
SVN address for the entire project: https://ken-javaframeword.googlecode.com/svn/trunk/JavaFramework2.5
Memcachedmanager entry address: http://ken-javaframeword.googlecode.com/svn/trunk/JavaFramework2.5/src/com/shine/framework/Memcached/MemCachedManager.java