-->
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.  [ 2 posts ] 
Author Message
 Post subject: Caching Question
PostPosted: Thu Nov 03, 2005 5:47 am 
Newbie

Joined: Wed Nov 02, 2005 12:08 pm
Posts: 3
I'm currently in the process of converting an old project over to use nHibernate and I have a quick question about caching.
In the project we have what was called an 'Entity cache' which really is an Object store consisting of a hashtable of hashtables of objects. This was used to hold certain data that wouldn't change, was not likely to change, and didn't really matter if it did change. Periodically this cache would refresh itself - reloading all the data from the database.
Since this cache relied on a thin service layer to retrieve values from the dao it still works under nHibernate (since it was never tied down to a specific implementation), but I am aware that nHibernate provides some caching of its own. What my question really comes down to is whether the nHibernate caching can be set to auto-refresh entities?
Thanks in advance.


Top
 Profile  
 
 Post subject:
PostPosted: Thu Nov 03, 2005 11:37 am 
Contributor
Contributor

Joined: Thu May 12, 2005 8:45 am
Posts: 226
None of the NHibernate second-level caches will reload data automatically, by themselves. NHibernate will re-add to the cache any items that have expired when you query for them. This should give the same result, except for the slight delay when hitting the DB to reload the cache.

(Actually, I don't know anything about the new NCache. It might do what you want.)


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

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.