方法未返回@Cacheable注释的值

时间:2019-12-26 19:21:37

标签: caching

@Cacheable(value = cacheName", keyGenerator = "cacheKeyGenerator")
public List<Rate> findByStateNameAndConsolidationKey(String stateName,RatesConsolidationKey consolidationKey) {
LOG.info("Method called not using cache   ");
List<TaxRate> listOfRates = repository.findByStateNameAndConsolidationKey(stateName,consolidationKey);
return listOfRates ;

这里我在方法上应用了缓存逻辑,但是无论我在哪里调用,方法都不会返回任何值。

0 个答案:

没有答案