Failed to find the centralized cache for hibernate second level cache and service cache

Source: Internet
Author: User
Tags infinispan

First, requirement: 1. Hibernate's second-level cache 2. Independent Business cache 3. Support for region, support for keySet, containsKey, and region traversal first, read the famous memcached and the client spymemcached. Failed. First of all, region is not supported, and various wheels are made by adding prefixes to keys. KeySet, containsKey, and traversal are not supported. So Pass. Then I saw the ehcache server. Unfortunately, people seem to have gone to torrxxxx, a commercial version. The ehcache server has not been updated for more than two years, and there is no documentation or network text combined with hibernate second-level cache. Pass. Then we can see Infinispan, which is said to be the successor of jboss cache. I also saw hibernate-infinispan, which also supports partitioning. You can use RemoteCacheStore to implement the hibernate second-level cache and query cache using a remote cache server. After an in-depth attempt, we found that jta is required first, which is too common. Second, hibernate-infinispan explicitly states that the three cache policies, including read-only, non-restrict-read-write, and transactional, are supported. However, there are a lot of read-write tasks in my existing code. So it failed. Finally, we can see redis and jedis. Currently popular nosql databases. You can also implement the functions you want. According to the network file, you can use hashes to implement region. This aspect basically meets the requirements. Then I am very happy to find the hibernate-redis project on github. After careful reading, only the read-only and non-restrict-read-write cache policies are supported. Depressed. Later, I also saw a jedis-lock project on github and implemented the redis lock mechanism. I started to try to modify the hibernate-redis, dependent on jedis-lock, and wanted to implement a read-write policy. I found that I am still not familiar with the cache part of hibernate, including various softLock and other things, look at the ehcache code to see the top. Depressed.

Related Article

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.