因为本地不能使用 spring-cache,我就是为了测试缓存能提升多大性能,而想出来的野路子。
CacheAspect
1 | package com.amoros.pumpkin.scorecard.infrastructure; |
CacheImpl
定义这个是为了测试完毕后,清理缓存。
是为了方便我调整 db 的参数后,再重新进行测试。
1 | package com.amoros.pumpkin.scorecard.gateway.impl; |
clear使用
1 | /** |
因为本地不能使用 spring-cache,我就是为了测试缓存能提升多大性能,而想出来的野路子。
1 | package com.amoros.pumpkin.scorecard.infrastructure; |
定义这个是为了测试完毕后,清理缓存。
是为了方便我调整 db 的参数后,再重新进行测试。
1 | package com.amoros.pumpkin.scorecard.gateway.impl; |
1 | /** |