-->
These old forums are deprecated now and set to read-only. We are waiting for you on our new forums!
More modern, Discourse-based and with GitHub/Google/Twitter authentication built-in.

All times are UTC - 5 hours [ DST ]



Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 1 post ] 
Author Message
 Post subject: Request for implementation of criteria.GetHashcode
PostPosted: Fri Oct 14, 2005 3:53 pm 
Beginner
Beginner

Joined: Mon Sep 26, 2005 5:57 pm
Posts: 39
My experience with the 2nd level cache has been very frustrating and I decided to not use it all (More on this on the Contrib forum)

While I decided not to use the 2nd level cache, I have some screens where I do display a lot of data using datagrid and paging. I was hoping to cache the results using SetCacheable(). I am not exactly sure why, but using SetCacheable does not work at all!! What do I need to do in order to enable caching of my query results. I put these entries in the nhibernate section of my web.config:
Code:
    <add
      key="hibernate.cache.provider_class"
      value="NHibernate.Caches.SysCache.SysCacheProvider, NHibernate.Caches.SysCache"
    />
    <add
      key="relativeExpiration"
      value="3000"
    />


Since the provided SetCacheable did not work, I wrote my own little routine to do the caching (which resulted in a dramatic reduction in execution time for each page). However, I need some unique key to be used as the key when I insert the query results in cache. I decided to use criteria.GetHashcode but it does not return unique values based upon the inputs to the criteria object.

May I request a feature addition, for implementation of GetHashcode method on the criteria class, so that a guaranteed unique value is returned, depending upon on the inputs to the criteria class.


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 1 post ] 

All times are UTC - 5 hours [ DST ]


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
© Copyright 2014, Red Hat Inc. All rights reserved. JBoss and Hibernate are registered trademarks and servicemarks of Red Hat, Inc.