摘要:
缓存是在web开发中经常用到的,将程序经常使用到或调用到的对象存在内存中,或者是耗时较长但又不具有实时性的查询数据放入内存中,在一定程度上可以提高性能和效率。 创建缓存对象 EntityCache public class EntityCache { /** * 保存的数据 */ private O 阅读全文
摘要:
Date d1 = new Date(System.currentTimeMillis()-1000); Date d2 = new Date(System.currentTimeMillis()); System.out.println(d1.compareTo(d2)); 前者大于后者 返回大于 阅读全文