[hibernate-issues] [Hibernate-JIRA] Commented: (HHH-5260) Tweak for query-cache via hibernate.hbm.xml needed

Nikita Koksharov (JIRA) noreply at atlassian.com
Tue May 25 12:34:54 EDT 2010


    [ http://opensource.atlassian.com/projects/hibernate/browse/HHH-5260?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=37272#action_37272 ] 

Nikita Koksharov commented on HHH-5260:
---------------------------------------

>Why do you consider current functionality in this area incorrect?
Because of this worked in jbosscache with hibernate 3.3.x. I migrated to infinispan in my application and noticed that cache configurations for different queries not loaded at all.

For entities and collections all works right. We have base settings "entity" and "collections" and can customize it in hibernate.cfg.xml. For queries we should have the same functionality as been in hibernate-jbosscache module.

>If you have a query that expands multiple entities, in which query cache do you store it and based on which rules? If you store in both query caches for both entity types, that's waste of space.
For each query i can set the region as for entity and collections. And for one query there are should be and was (in hibernate-jbosscache) only one cache. There are no "both query caches". Where you get this?

> Tweak for query-cache via hibernate.hbm.xml needed
> --------------------------------------------------
>
>                 Key: HHH-5260
>                 URL: http://opensource.atlassian.com/projects/hibernate/browse/HHH-5260
>             Project: Hibernate Core
>          Issue Type: New Feature
>          Components: caching (L2)
>            Reporter: Galder Zamarreno
>            Assignee: Galder Zamarreno
>
> From Niktia Koksharov in https://jira.jboss.org/browse/ISPN-458:
> "In current implementation of hibernate-infinispan we can tune only entity and collection settings via hibernate.xml.cfg. But tuning in same way for queries needed too. In current version there are always the same cache region for all queries (look at org.hibernate.cache.infinispan.InfinispanRegionFactory.buildQueryResultsRegion) and it's incorrect. 
> In org.hibernate.cache.infinispan.InfinispanRegionFactory.buildQueryResultsRegion 
> Replace those lines: 
>         String cacheName = typeOverrides.get(QUERY_KEY).getCacheName(); 
>         CacheAdapter cacheAdapter = CacheAdapterImpl.newInstance(manager.getCache(cacheName)); 
> To: 
>         Cache cache = getCache(regionName, QUERY_KEY, properties); 
>         CacheAdapter cacheAdapter = CacheAdapterImpl.newInstance(cache); "

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://opensource.atlassian.com/projects/hibernate/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        


More information about the hibernate-issues mailing list