Why I suggest that everyone must use J2Cache

In a project, Redis is usually used to cache some data

insert image description here
edis application A application B application C
But generally speaking, redis does not store too much data, but the access volume will be relatively high, so it may happen that the redis machine does not occupy a lot of memory, but the bandwidth is full . And if you want to solve this problem, you need to use redis cluster to distribute requests to different redis nodes, but this obviously requires more redis machines, which increases the cost.
Another way to solve this problem is to use local cache, and j2cache can solve this problem.
insert image description here
redis application A application B application Ccaffeinecaffeinecaffeine
can automatically help us save data in the local cache and redis at the same time by using j2cache, and even if redis hangs, j2cache can also get the data in the local cache.
At the same time, j2cache also provides mechanisms such as cache expiration and broadcasting, which can realize functions such as data expiration and local cache data synchronization.
J2Cache's two-level cache structure
L1: caffeine / ehcache L2: Redis / Memcached
Therefore, I strongly recommend that you use j2cache, so that you can use both redis and local cache to improve the operating efficiency of the entire system.

Guess you like

Origin blog.csdn.net/Park33/article/details/131034183