Implementation Solutions of various cache mechanisms in Java

Source: Internet
Author: User

In Java, different classes have their own separate cache mechanism, and the implementation methods may be different. This article lists the implementation methods of common cache mechanisms in Java, at the same time, a comprehensive comparison is conducted.

Oscache

Oscache is a widely used high-performance Java EE cache framework. Oscache can be used in common cache solutions for any Java application.

Oscache has the following features: Any object can be cached. You can cache some JSP pages or HTTP requests without any restrictions. Any Java object can be cached. Has a comprehensive API-Oscache API to give you a comprehensive program to control all the Oscache features.

Permanent cache-the cache can be written to the hard disk at will, so expensive data can be created (expensive-to-create) to keep the cache, or even restart the application. Supports parameter configuration for cluster-cluster cache data that can be individually configured without modifying the code. Cache record expiration-you can control the expiration of cache objects to the maximum extent, including pluggable refresh policies (if default performance is not required ).

Java Caching System

JSC (Java Caching System) is a distributed cache system and a server-based Java application. It accelerates dynamic Web applications by providing management of various dynamic cache data. Like other cache systems, JCS is also an application for high-speed reading and low-speed writing. Dynamic Content and report systems provide better performance.

If a website has a duplicate website structure and uses a database with intermittent updates (instead of continuously updating the database, the performance and scalability can be improved by executing the cache.

Ehcache

Ehcache is a pure Java cache in the process. It has the following features: fast and simple. It acts as a pluggable cache for hibernate 2.1, with minimal dependencies, comprehensive documentation and testing.

Jcache

Jcache is an open source program, is trying to become a JSR-107 open source specification, JSR-107 specification has not changed for many years. This version is still built on the original function definition.

Shiftone

Shiftone Java object cache is a Java lib that executes a series of strict object cache policies, just like a Lightweight Framework for configuring cache working states.

Swarmcache

Swarmcache is a simple and effective distributed cache that uses IP multicast to communicate with other hosts on the same LAN. It is designed especially for cluster and data-driven Web applications. Swarmcache provides better performance support for typical read operations that greatly exceed write operations. Swarmcache uses javagroups to manage subordination and distributed cache communication.

Treecache/jbosscache

Jbosscache is a replication transaction processing cache that allows you to cache enterprise-level application data to better improve performance. Cache data is automatically copied, allowing you to easily work in clusters between JBoss servers. Jbosscache can run an mbean service through the JBoss application service or other J2EE containers. Of course, jbosscache can also run independently.

Jbosscache consists of two modules: treecache and treecacheaop. Treecache-a transaction processing cache for tree structure replication. Treecacheaop-is an "Object-Oriented" cache, which uses AOP to dynamically manage pojo (plain old Java objects)

Note: AOP is a continuation of OOP. It is short for Aspect Oriented Programming, meaning Aspect-Oriented Programming.

Whirlycache

Whirlycache is a fast, configurable cache for objects that exist in the memory. It can accelerate the speed of websites or applications by caching objects, otherwise it must be created by querying the database or other costly processing programs.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.