首页 > 系统服务 > 详细

criteria.setCacheable(true);这个方法是干什么用的

时间:2017-03-09 17:07:05      阅读:1020      评论:0      收藏:0      [点我收藏+]

criteria.setCacheable(true);

一下是Criteria的底层源代码

/**
* Enable caching of this query result, provided query caching is enabled
* for the underlying session factory.
*
* @param cacheable Should the result be considered cacheable; default is
* to not cache (false).
* @return this (for method chaining)
*/
public Criteria setCacheable(boolean cacheable);

意思是:

启用查询缓存结果,提供查询缓存
*为底层会话工厂。
*
* @param缓存的结果应该被认为是默认缓存;
*不缓存(false)。
*“退货(方法链接)

就是给criteria一个缓存

criteria.setCacheable(true);这个方法是干什么用的

原文:http://www.cnblogs.com/chengxuy/p/6526454.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!