@@ -0,0 +1,634 @@
+package cache;%0A%0Aimport org.junit.Test;%0A%0Aimport java.util.concurrent.TimeUnit;%0A%0A/**%0A * Created by Linuxea on 2017/8/7.%0A */%0Apublic class CacheUtilsTest %7B%0A%0A%09@Test%0A%09public void test() throws InterruptedException %7B%0A%09%09CacheUtils.setWithSeconds(%22name%22,%22linuxea%22,5);%0A%09%09for (;;)%7B%0A%09%09%09String data = CacheUtils.get(%22name%22);%0A%09%09%09System.out.println(data);%0A%09%09%09TimeUnit.SECONDS.sleep(2);%0A%09%09%7D%0A%09%7D%0A%0A%09@Test%0A%09public void test2() throws InterruptedException%7B%0A%09%09CacheUtils.setWithSeconds(%22name%22, %22linuxea%22, 5);%0A%09%09for (int i = 0; i %3C 15; i++) %7B%0A%09%09%09String object = CacheUtils.get(%22name%22);%0A%09%09%09System.out.println(object);%0A%09%09%09TimeUnit.SECONDS.sleep(1);%0A%09%09%7D%0A%09%7D%0A%0A%7D%0A

Create CacheUtilsTest.java