hibernate中的二级缓存与查询缓存的区别,急!非常感谢各位专家大侠解答

解决方案 »

  1.   

    hibernate里有session缓存,还有sessionFactory缓存。
      

  2.   

    查询缓存需要基于二级缓存来实现。
    Note that the query cache does not cache the state of the actual entities in the result set; it caches only identifier values and results of value type. So the query cache should always be used in conjunction with the second-level cache. 
    查询缓存不保存对象实体,它只保存对象id及对象类型。真正的对象还是存在于二级缓存中。