-->
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.  [ 7 posts ] 
Author Message
 Post subject: SysCache Not Always Working When Debugging using VS 2005
PostPosted: Fri Nov 24, 2006 6:49 am 
Senior
Senior

Joined: Sat Sep 03, 2005 12:54 am
Posts: 139
Hi,

I have noticed that the 2nd level SysCache is not always working when I am debugging using Visual Studio 2005...has anyone else noticed this? I can see that my app is running visibly slower and when I run SQL profiler I can see all the activity against the DB despite the fact that I have the cache fully enabled.

The strange this is that in other instances of debugging, with exactly the same app, I can see that the cache is operating fully as expected with no hits to the DB.

Obviously, this is not a major issue as I am only debugging, but it is strange nevertheless!

Cheers,

Jason


Top
 Profile  
 
 Post subject:
PostPosted: Sat Jan 27, 2007 1:59 am 
Senior
Senior

Joined: Sat Sep 03, 2005 12:54 am
Posts: 139
Actually, it seems that the SysCache stops working entirely as soon as the development web server is running...even for websites that are hosted in IIS! Not sure if this is specific to NH though as it could be a problem in general with SysCache.


Top
 Profile  
 
 Post subject: Same Issue
PostPosted: Thu Mar 22, 2007 2:49 pm 
Newbie

Joined: Wed Apr 07, 2004 6:13 pm
Posts: 18
I am having a very similar issue... however, I am not sure if it is only isolated to debugging.

Basically, I see NHibernate cache my entities, but they are never there when I go for subsequent lookups. The logs show me that the object is materialized and placed into the cache at a particular region, but directly after that it appears that the entire session factory is reloaded.

Any Ideas?

_________________
Thanks,
Aaron


Top
 Profile  
 
 Post subject: More...
PostPosted: Thu Mar 22, 2007 4:24 pm 
Newbie

Joined: Wed Apr 07, 2004 6:13 pm
Posts: 18
So I have confirmed that this is the case with VS 2005 in Debug mode: After some period of time / memory consumption the entire NHibernate session factory is rebuilt (visible via the logging of the configuration reload). At that point, the cache is cleared, obviously... but also from that point forward the cache will not work - items stored in the cache are almost immediately removed (but what process, I don't know). I have even witnessed more session factory reloads from that point on.

Any ideas?

_________________
Thanks,
Aaron


Top
 Profile  
 
 Post subject: How to view cached entities persisted SysCache or Prevalence
PostPosted: Thu Mar 29, 2007 12:06 pm 
Newbie

Joined: Thu Mar 15, 2007 10:34 am
Posts: 8
I'm trying to find out whether entities are persisted into Cache (currently using SysCache)?

Everytime I try to query for an entity based on Criteria it always does a new Database fetch (based on SQL from the Log file).

Is there anyway to view all the entities persisted in Cache?

Thanks for all the help guys

_________________
Rama Katta


Top
 Profile  
 
 Post subject:
PostPosted: Thu Mar 29, 2007 12:24 pm 
Newbie

Joined: Wed Apr 07, 2004 6:13 pm
Posts: 18
Criteria queries are stored in the Query Cache... so ensure that you are using the "setCacheable(true)" and "setCacheRegion(...)" methods when you create your query. Also, you must have a matching cache region defined in your web.config file under the <syscache> section.

Finally, you can alway interrogate the ASP Cache to see what is in it if you are using SysCache.

HTH,
Aaron

_________________
Thanks,
Aaron


Top
 Profile  
 
 Post subject:
PostPosted: Thu Mar 29, 2007 5:17 pm 
Newbie

Joined: Thu Mar 15, 2007 10:34 am
Posts: 8
thanks Aaron

I'll try and come back to you

_________________
Rama Katta


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 7 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.