我的项目使用一个简单的spring-memcache来缓存服务方法,但它不起作用,如下所示:
@ReadThroughSingleCache(namespace = "AdvServiceImpl.findByIdList", expiration = 60)
public List<Adv> findByIdList(@ParameterValueKeyProvider(order = 0) List<String> idList, @ParameterValueKeyProvider(order = 1) String deviceType, @ParameterValueKeyProvider(order = 2) String sourceId) throws Exception {
但是我这样写它可以工作:
@ReadThroughSingleCache(namespace = "AdvServiceImpl.findByIdList", expiration = 60)
public List<Adv> findByIdList(List<String> idList, @ParameterValueKeyProvider(order = 0) String deviceType, @ParameterValueKeyProvider(order = 1) String sourceId) throws Exception {
答案 0 :(得分:1)