@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 ;
这里我在方法上应用了缓存逻辑,但是无论我在哪里调用,方法都不会返回任何值。