最近一直在老家远程办公,微信突然响了下,有同事说遇到了一个奇怪的问题,让我帮忙看下。
现象就是标题所说的缓存获取不到的问题,我一听感觉这个问题挺有意思的,决定一探究竟。
下面给出部分代码还原下案发现场:
```
@CreateCache(name = “demo”, expire = 600)
private Cache
@Test
public void test() {
ThirdPartyEventResponse eventResponse = new ThirdPartyEventResponse();
eventResponse.setTicketCategories(Arrays.asList(ticketCategoryResponse));
// 省略 …..
// 添加
cache.put(DisChannelType.PIAONIU.getValue(), eventResponse);
// 获取