我的项目使用了一个simple-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 {