- 授权协议: 未知
- 开发语言: Java
- 操作系统: 跨平台
- 软件首页: https://github.com/yuxiangping/ecache
- 软件文档: https://github.com/yuxiangping/ecache/blob/master/README.md
- 官方下载: https://github.com/yuxiangping/ecache/archive/master.zip
软件介绍
ecache
简单的缓存系统 纯属学习
介绍
ECache -> easy cache 简单粗暴的命名
之前自己在做一个项目,服务器需要接入缓存。由于是云主机(屌丝 你懂的),那点内存根本不够再安装个memcache或者redis之类的缓存服务。当时就用了个最搓的办法,直接MAP放内存了。弊端每次重启缓存就没 了。 后面有点空闲时间就想写个简单点的缓存(中间也有看下ehcache,代码挺复杂的,可以学习学习),能持久化就行。然后就写了这个。 还能用 ^.^
开始使用
使用Spring启动缓存、管理生命周期
<bean id="cache" class="com.ecache.CacheManager"> <property name="config"> <bean class="com.ecache.Configuration"> <property name="root" value="/usr/local/ecache/"/> <property name="space" value="10"/> <!-- unit GB --> </bean> </property> </bean>
代码中使用
class CacheTest {
ECache<String, String> cache;
public boolean put(String key, String value) {
return cache.set(key, value);
}
public boolean put(String key, String value, long time) {
return cache.set(key, value, time);
}
public String get(String key) {
return cache.get(key);
}
public boolean remove(String key) {
return cache.remove(key);
}
public boolean clear() {
return cache.clear();
}
}
ppk on JavaScript, 1/e
Peter-Paul Koch / New Riders Press / 2006-09-20 / USD 44.99
Whether you're an old-school scripter who needs to modernize your JavaScripting skills or a standards-aware Web developer who needs best practices and code examples, you'll welcome this guide from a J......一起来看看 《ppk on JavaScript, 1/e》 这本书的介绍吧!
图片转BASE64编码
在线图片转Base64编码工具
XML 在线格式化
在线 XML 格式化压缩工具
