spring boot 注解缓存

缓存到接口

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
/**
* LiveMapper
*/
@CacheConfig(cacheNames = "live")
public interface LiveMapper {

@Cacheable(key = "#root.method.name", unless = "#result == null")
List<Map<String, Object>> test();

@Cacheable(key = "#params.get('gameId')+#params.get('dateToday')", unless = "#result == null")
List<Map<String, Object>> getOps(Map<String, Object> params);

List<Map<String, Object>> getServersByOpGameId(Map<String, Object> params);

}

Your browser is out-of-date!

Update your browser to view this website correctly. Update my browser now

×