Java Open Source Distributed cache Framework Ehcache

Source: Internet
Author: User
Tags server memory

Ehcache is a Java implementation of the open-source distributed cache framework, Ehcache can effectively reduce the load of the database, you can keep the data in different server memory, when the need for data can be quickly accessed. At the same time the Ehcache extension is very simple and there are several official cache configurations available. You can pass in different parameters by declaring the configuration, configuring it in XML, configuring it in a program, or invoking a constructor method.

The following is an architectural diagram of Ehcache:

Ehcache has the following features:
    • The access speed is very fast and the performance is very good.
    • You can apply multiple cache policies.
    • The hierarchical cache allows users to specify what data is cached in the hard disk and which data is cached in memory.
    • Distributed caching can be done through RMI, pluggable APIs, and so on.
    • A listening interface with cache and cache manager.
    • Supports multi-cache manager instances, and multiple cache areas for one instance.
    • The cache implementation of Hibernate is provided by default.
Configuration example code for Ehcache:

<ehcache>
<diskstore path= "Java.io.tmpdir"/>
<defaultcache
Maxelementsinmemory= "10000″
Eternal= "false"
Timetoidleseconds= "120″
Timetoliveseconds= "120″
Overflowtodisk= "true"
Maxelementsondisk= "10000000″
Diskpersistent= "false"
Diskexpirythreadintervalseconds= "120″
Memorystoreevictionpolicy= "LRU"
/>
</ehcache>

In the same Java cache framework, the Ehcache configuration is relatively simple and easy to get started, the biggest advantage is that it supports distributed cache

Java Open Source Distributed cache Framework Ehcache

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.