【问题标题】:@Async and @Cacheable Caching Non-Null Response@Async 和 @Cacheable 缓存非空响应
【发布时间】:2015-06-29 12:03:30
【问题描述】:

如果我有一个标记为@Async@Cacheable 的方法,那么在null 工作时不缓存结果的条件是否有效(考虑到它返回一个Future)?

@Async 
@Cacheable(unless = "#result == null")
public ListenableFuture<ContentSet> doSomething(){}

【问题讨论】:

    标签: spring spring-boot spring-cache


    【解决方案1】:

    检查SPR-12967。不支持此类返回类型。

    【讨论】:

      猜你喜欢
      • 2018-02-07
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2017-06-14
      • 1970-01-01
      • 2018-04-16
      • 2012-08-20
      相关资源
      最近更新 更多