由买买提看人间百态

boards

本页内容为未名空间相应帖子的节选和存档,一周内的贴子最多显示50字,超过一周显示500字 访问原贴
Java版 - EHCache --- hibernate question
相关主题
How to disable hibernate second-level cache for an entityRe: local database to server (转载)
探讨一个java, sql设计问题hibernate 的两个问题
memcachedHibernate的优势具体体现在哪里?
寻求java技术和解决方案Annotations JPA Cachable vs Hibernate Cache
搞不懂为什么hibernate为什么这么流行?hibernate question
问一个Collection Update的问题Hibernate query
问个多线程问题hibernate问题。。
为什么call hibernate service 要比直接用store procedures慢啊?新手如何提高java 水平?
相关话题的讨论汇总
话题: ehcache话题: cache话题: query话题: hibernate话题: question
进入Java版参与讨论
1 (共1页)
c******n
发帖数: 4965
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
1 (共1页)
进入Java版参与讨论
相关主题
新手如何提高java 水平?搞不懂为什么hibernate为什么这么流行?
Another Servlet Problem:Browser Caching问一个Collection Update的问题
PreparedStatement 有没有失效期啊?问个多线程问题
final static constants easy get cached?为什么call hibernate service 要比直接用store procedures慢啊?
How to disable hibernate second-level cache for an entityRe: local database to server (转载)
探讨一个java, sql设计问题hibernate 的两个问题
memcachedHibernate的优势具体体现在哪里?
寻求java技术和解决方案Annotations JPA Cachable vs Hibernate Cache
相关话题的讨论汇总
话题: ehcache话题: cache话题: query话题: hibernate话题: question