ehcache-2.x-scenario add EhcacheCloneInterceptor case

This commit is contained in:
lsyf 2020-02-18 13:07:16 +08:00
parent 54c1cd5cb0
commit 74c1f7ef73
1 changed files with 8 additions and 1 deletions

View File

@ -35,7 +35,14 @@ public class CaseServlet extends HttpServlet {
@Override
protected void doGet(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException {
Cache cache = cacheManager.getCache("testCache");
Cache originCache = cacheManager.getCache("testCache");
// EhcacheCloneInterceptor
Cache cache = null;
try {
cache = originCache.clone();
} catch (CloneNotSupportedException e) {
}
String objectKey = "dataKey";