hibernate
逯加
有心、有望、有爱——浑然而往,逯然而来
展开
-
Hibernate缓存机制
一、why(为什么要用Hibernate缓存?)Hibernate是一个持久层框架,经常访问物理数据库。为了降低应用程序对物理数据源访问的频次,从而提高应用程序的运行性能。缓存内的数据是对物理数据源中的数据的复制,应用程序在运行时从缓存读写数据,在特定的时刻或事件会同步缓存和物理数据源的数据。二、what(Hibernate缓存原理是怎样的?)Hibernate缓存包括两大类:Hibernate一级转载 2015-08-10 14:59:18 · 392 阅读 · 0 评论 -
hibernate 一级缓存测试
Session工厂类:import org.hibernate.Session;import org.hibernate.SessionFactory;import org.hibernate.cfg.Configuration;import org.hibernate.stat.Statistics;public class HibernateSessionFactory { priv原创 2015-08-10 15:21:28 · 413 阅读 · 0 评论 -
hibernate二级缓存测试
SessionFactory类:import org.hibernate.Session;import org.hibernate.SessionFactory;import org.hibernate.cfg.Configuration;import org.hibernate.stat.Statistics;public class HibernateSessionFactory {原创 2015-08-13 17:34:59 · 1880 阅读 · 2 评论