java多级缓存框架 mutli-cache

码农软件 · 软件分类 · 缓存系统 · 2019-08-29 22:13:26

软件介绍

mutli-cache Java多级缓存框架
L1: 进程内缓存(ehcache)
L2: 集中式缓存,支持多种集中式缓存服务器,如 Redis

缓存任意切换
可使用单一缓存,ehcache或redis
支持redis集群,代码无需任何改动

支持 JGroups 和 Redis Subscribe 两种方式进行缓存同步。在某些云平台上可能无法使用 JGroups 组播方式,可以采用 Redis 发布订阅的方式

使用方式
classpath下建立cache.properties文件(参考resource/cache.properties)


String cacheName = "person";
CacheClient client = CacheClient.getInstance();
client.put(cacheName, "10001", new Person("董超", 26));
Person p = client.get(cacheName, "10001");
System.out.println(p);


List<String> keys = client.keys(cacheName);
System.out.println(Arrays.toString(keys.toArray()));


client.update(cacheName, "10002", new Person("董李文", 1));
p = client.get(cacheName, "10002");
System.out.println(p);

keys = client.keys(cacheName);
System.out.println(Arrays.toString(keys.toArray()));

client.remove(cacheName, "10001");

keys = client.keys(cacheName);
System.out.println(Arrays.toString(keys.toArray()));

client.clear(cacheName);
keys = client.keys(cacheName);
System.out.println(Arrays.toString(keys.toArray()));

本文地址:https://codercto.com/soft/d/13461.html

The Probabilistic Method

The Probabilistic Method

Noga Alon、Joel H. Spencer / Wiley-Interscience / 2008-8-11 / USD 137.00

Praise for the Second Edition : "Serious researchers in combinatorics or algorithm design will wish to read the book in its entirety...the book may also be enjoyed on a lighter level since the diffe......一起来看看 《The Probabilistic Method》 这本书的介绍吧!

JS 压缩/解压工具
JS 压缩/解压工具

在线压缩/解压 JS 代码

XML 在线格式化
XML 在线格式化

在线 XML 格式化压缩工具

HSV CMYK 转换工具
HSV CMYK 转换工具

HSV CMYK互换工具