Skip to content

Latest commit

 

History

History
31 lines (27 loc) · 711 Bytes

README.md

File metadata and controls

31 lines (27 loc) · 711 Bytes

zxy-commons-memcache

memcache基础操作模块。

如果其他模块需要使用这些功能时,只需要在maven中加入:

依赖添加:
<dependency>
    <groupId>com.zxy</groupId>
    <artifactId>zxy-commons-memcache</artifactId>
    <version>${zxy_commons_version}</version>
</dependency>

使用说明

  • memcache.properties配置:
	#多个用逗号分隔
	servers=172.28.28.50:11211
	#连接池大小建议1
	connectionPoolSize=1
	#超时时间单位毫秒
	connectTimeout=5000
  • 使用:
	MemcacheClient client = MemcacheFactory.getMemcacheClient();
    client.set("xxx", "111");

请参考DEMO