添加缓存代码

This commit is contained in:
lixiangrong
2016-05-23 09:39:48 +08:00
parent 5615898dd0
commit 9078eb70f9
9 changed files with 717 additions and 225 deletions

View File

@@ -0,0 +1,17 @@
package osc.git.eh3.cache;
public class Test {
public static void main(String[] args) {
SimpleCache<String, Object> cache = new SimpleCache<>(5);
for (int i = 0; i < 10; i++) {
cache.put(""+i, i);
}
for (int i = 0; i < 10; i++) {
System.out.println(cache.get(i+""));
}
}
}