...
|
...
|
@@ -23,11 +23,11 @@ public class TestEhcacheController { |
|
|
|
|
|
@RequestMapping(value = "/testPut")
|
|
|
@ResponseBody
|
|
|
public Map<String, Object> testPut(int count) {
|
|
|
public Map<String, Object> testPut(int count,int viewNum) {
|
|
|
Map<String,String> paramMap = new HashMap<String, String>();
|
|
|
JSONObject productList = (JSONObject)commonSceneProductListService.productList(paramMap).getData();
|
|
|
for (int i=1;i<=count;i++) {
|
|
|
paramMap.put("viewNum", "300");
|
|
|
paramMap.put("viewNum", ""+viewNum);
|
|
|
ehCache.addOrUpdate("Key"+i, new CacheObject(productList), 1);
|
|
|
}
|
|
|
System.out.println(ehCache.getStatistics());
|
...
|
...
|
|