【发布时间】:2014-04-23 20:37:11
【问题描述】:
我正在尝试在我们的应用程序中启用查询缓存。根据我提供的文档
hibernate.cache.use_query_cache 在我的查询中作为true 和givent setCacheable()。但我遇到了异常。
org.hibernate.cache.NoCacheRegionFactoryAvailableException: Second-level cache is used in the application, but property hibernate.cache.region.factory_class is not given, please either disable second level cache or set correct region factory class name to property hibernate.cache.region.factory_class (and make sure the second level cache provider, hibernate-infinispan, for example, is available in the classpath).
我是否应该为查询缓存指定缓存区域,我使用的是 Hibernate 4。请在这方面帮助我
【问题讨论】:
-
见this
标签: java spring hibernate caching