Simple-Spring-Memcached 介绍
Simple-Spring-Memcached (SSM) 提供一个简单的方法为
Spring 的 Bean 启用
memcached 缓存支持,使用时只需要在 Bean 中通过
@Annotation 注释进行声明即可。
示例代码:
@ReadThroughSingleCache(namespace = “ComplexObject”, keyIndex = 1, expiration
= 300)
public ComplexObject getObjectByPrimaryKey(Long primaryKey) {…}
示例配置: