Commit a426384d4167f7c0df4ca72ceffed93b261a7ac9
1 parent
1cfc0bc9
增加 Spring Cache 框架
Showing
1 changed file
with
1 additions
and
2 deletions
yudao-module-infra/yudao-module-infra-impl/src/main/java/cn/iocoder/yudao/module/infra/service/test/TestDemoServiceImpl.java
| ... | ... | @@ -33,7 +33,6 @@ public class TestDemoServiceImpl implements TestDemoService { |
| 33 | 33 | private TestDemoMapper testDemoMapper; |
| 34 | 34 | |
| 35 | 35 | @Override |
| 36 | - @CacheEvict(value = "test", key = "#createReqVO.id") | |
| 37 | 36 | public Long createTestDemo(TestDemoCreateReqVO createReqVO) { |
| 38 | 37 | // 插入 |
| 39 | 38 | TestDemoDO testDemo = TestDemoConvert.INSTANCE.convert(createReqVO); |
| ... | ... | @@ -53,7 +52,7 @@ public class TestDemoServiceImpl implements TestDemoService { |
| 53 | 52 | } |
| 54 | 53 | |
| 55 | 54 | @Override |
| 56 | - @CacheEvict(value = "test", key = "'test:' + #id") | |
| 55 | + @CacheEvict(value = "test", key = "#id") | |
| 57 | 56 | public void deleteTestDemo(Long id) { |
| 58 | 57 | // 校验存在 |
| 59 | 58 | this.validateTestDemoExists(id); | ... | ... |