-->
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.  [ 9 posts ] 
Author Message
 Post subject: staticExpiration behaviour, plus jcs-class/collection-cache
PostPosted: Fri Oct 14, 2005 3:58 pm 
Newbie

Joined: Tue Oct 11, 2005 2:44 pm
Posts: 12
Hello everyone!

I would like to be able to do the following things, using the asp.net cache:
1. Setup different cache regions, and assign classes/collections to the appropriate regions
2. Have cached data expire after a fixed amount of time since being added in the cache, regardless of the last access time (as opposed to sliding expiration, a fixed amount of time from the last access)

For issue 1, it looks like jcs-class-cache/jcs-collection-cache are not implemented. They are not even read from the config file.

For issue 2, IMHO the current interpretation of staticExpiration is of not much help. I cannot see a scenario where I would want to expire cached data at a predetermined date/time. Is my understanding of the current mechanism wrong?

Is there any way to do it with nhibernate 1.0?
For issue 2 I can volunteer, however, issue 1 may have more implications and I don't have the time right now to see it completed.

Thanks,
Cris


Top
 Profile  
 
 Post subject:
PostPosted: Sat Oct 15, 2005 3:23 am 
Contributor
Contributor

Joined: Thu May 12, 2005 8:45 am
Posts: 226
The regions are configurable already. Please see the unit test code for samples. Sorry for the lack of "proper" documentation.

The expiration issue is a known issue and up for discussion. See this thread: http://nhibernate.sourceforge.net/forum/viewtopic.php?t=1015

The the caching tags are "cache" or "jcs-cache" ("jcs-cache" should go away soon), and is the same for both the class level and the collection level.

cconstatin wrote:
the current interpretation of staticExpiration is of not much help

I agree totally. I don't know what Microsoft was thinking. What developer would ever say "I want the data for my web page to expire on the third Wednesday in July, 2037." - it's rediculous.


Top
 Profile  
 
 Post subject:
PostPosted: Sun Oct 16, 2005 4:21 pm 
Newbie

Joined: Tue Oct 11, 2005 2:44 pm
Posts: 12
Yeah, I already figured out how to configure the regions in SysCache.
There is no way to attach classes/collections to regions though, or at least I wasn't able to find it.

Thanks,
Cris


Top
 Profile  
 
 Post subject:
PostPosted: Sun Oct 16, 2005 10:33 pm 
Contributor
Contributor

Joined: Thu May 12, 2005 8:45 am
Posts: 226
I believe the region is the object namespace. What do your logs look like?


Top
 Profile  
 
 Post subject:
PostPosted: Thu Nov 10, 2005 10:25 pm 
Newbie

Joined: Tue Oct 11, 2005 2:44 pm
Posts: 12
By looking at the logs, I can see the region name is the type full name.
This is a little too fine grained for a reasonably sized applications.

Do you know if there are any plans to add support for <jcs-class-cache/> element in the hibernate.cfg.xml file?

Thanks
Cris


Top
 Profile  
 
 Post subject:
PostPosted: Fri Nov 11, 2005 7:35 am 
Contributor
Contributor

Joined: Wed May 11, 2005 4:59 pm
Posts: 1766
Location: Prague, Czech Republic
<jcs-cache> and <cache> elements will be supported in 1.0.1.


Top
 Profile  
 
 Post subject:
PostPosted: Fri Nov 11, 2005 1:44 pm 
Newbie

Joined: Tue Oct 11, 2005 2:44 pm
Posts: 12
Great! I suppose you are hard at work. When do you plan on releasing 1.0.1?

Thanks,
Cris


Top
 Profile  
 
 Post subject:
PostPosted: Fri Nov 11, 2005 3:36 pm 
Contributor
Contributor

Joined: Wed May 11, 2005 4:59 pm
Posts: 1766
Location: Prague, Czech Republic
Very soon, this week or next week.


Top
 Profile  
 
 Post subject:
PostPosted: Fri Nov 11, 2005 7:03 pm 
Contributor
Contributor

Joined: Thu May 12, 2005 8:45 am
Posts: 226
Why are we hanging on to "jcs-" in the all the cache settings? It's legacy in Hibernate for Java, and there is no JCS Cache for .NET.


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