Redian新闻
>
Battle of the X-panes now free on hulu.com
avatar
Battle of the X-panes now free on hulu.com# Aviation - 航空航天
c*n
1
I enabled ehcache as second level cache,
from TRACE level logging, I can see that hibernate/ehcache did try to place
query result/load result into cache, but every time I query with the same
parameter (i.e. there is only one uniq query), so it says
"caching xxx ..."
"xxx is already cached",
this is fine.
but it seems that after trying to read from the cache for only 1 time, it
never tries to use the cache again.
I can see on the first read, it logs:
2011-12-20 15:29:53,344 95419 INFO [org.hibernate.cache.StandardQueryCache]
[http-8080-2][] starting query cache at region: org.hi
bernate.cache.StandardQueryCache
2011-12-20 15:29:53,348 95423 DEBUG [org.hibernate.cache.StandardQueryCache]
[http-8080-2][] checking cached query results in regio
n: org.hibernate.cache.StandardQueryCache
but this never appears again.
so why is it not using the cache?
I did set the properties in hibernate.cfg.xml, and used setCacheable() and
setRegion() in my session.createQuery().list()
thanks
相关阅读
logo
联系我们隐私协议©2024 redian.news
Redian新闻
Redian.news刊载任何文章,不代表同意其说法或描述,仅为提供更多信息,也不构成任何建议。文章信息的合法性及真实性由其作者负责,与Redian.news及其运营公司无关。欢迎投稿,如发现稿件侵权,或作者不愿在本网发表文章,请版权拥有者通知本网处理。