Introduction to the Encache cache

Source: Internet
Author: User

PrefaceA period of time in the work used to encache, in fact, the work inside Encache and memcache are in use, the opportunity to simply learn, but also share with you the cache related knowledge. This article mainly introduces the Encache briefly.
The ChaseI. IntroductionEhCache is a pure Java in-process caching framework, which is fast and capable, and is the default Cacheprovider in Hibernate. Ehcache is a widely used, open source Java distributed cache. Primarily for general purpose caches, Java EE and lightweight containers. It features memory and disk storage, cache loaders, cache extensions, cache exception handlers, a gzip cache servlet filter, and support for rest and soap APIs. The following is the official website explanation:Ehcache is a open source, standards-based cache for boosting performance, offloading your database, and simplifying s Calability. It's the most widely-used java-based cache because it ' s robust, proven, and full-featured. Ehcache scales from in-process, with one or more nodes, all the same to mixed in-process/out-of-process configurations with Terabyte-sized caches.
two. FeaturesThe main features are:1. Fast2. Simple3. Multiple Cache Policies4. Cache data has two levels: memory and disk, so there is no need to worry about capacity issues5. Cache data is written to disk during virtual machine restart6. Distributed caching can be done via RMI, pluggable APIs, etc.7. Listening interface with cache and cache manager8. Support multiple cache manager instances, and more than one instance of the cache area9. Provide hibernate cache implementation
three. Simple to usethe approximate steps to create and manage the cache using CacheManager are:First step: Generate CacheManager ObjectsStep Two: Generate the Cache objectStep Three: add element elements of a key-value pair composed of Key,value to the cache objectFourth step: Turn off CacheManager.
There are 4 ways of creating CacheManager:method One: Create with default profileEhcache has the default configuration file Ehcache.xml, which has a default configuration and a default cache. mode Two: Create with the specified profile
method Three: Find the configuration file from Classpath and create
Mode four: Create via input stream


Introduction to the Encache cache

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.