@Async 和@Cacheable 缓存非空响应

@Async and @Cacheable Caching Non-Null Response

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

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

勾选SPR-12967。不支持此类 return 类型。