-->
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.  [ 3 posts ] 
Author Message
 Post subject: ehcache max-elements on collection
PostPosted: Mon Apr 19, 2010 7:10 am 
Newbie

Joined: Tue Apr 06, 2010 8:46 am
Posts: 7
Hello
I'm just considering using ehcache but it's not very clear to me from the docs where the "maxElementsInMemory" setting refers, when being used for a collection association.
For example, having an entity Hotel and an association Set<RoomType> and setting "maxElementsInMemory=1000" on the ehcache region "my.package.path.Hotel.roomTypes" does it mean:

1. cache 1000 RoomType references (PKs) for associations of this type?

or

2. cache the references (PKs) for 1000 associations (i.e. for 1000 hotels' room type collections) ?

In other words does it apply to the number of the total child elements or to the number of parent associations being cached?


Top
 Profile  
 
 Post subject: Re: ehcache max-elements on collection
PostPosted: Mon Apr 19, 2010 7:33 am 
Newbie

Joined: Mon Apr 19, 2010 7:29 am
Posts: 1
In database terms we need to implement this as READ UNCOMMITTED.

The data we are searching against is likely being changed by other
cache operations. It is a best efforts approach.

This should suit. Max?

On 14/11/2009, at 1:48 AM, Alex Miller wrote:

> Just to check, it would be important to implement something like
> this that you don't require a consistent snapshot of the answer but
> rather a best effort snapshot. That is, as you're taking the
> snapshot, things might be added/updated/removed behind you.
> Otherwise you essentially require a "lock the world" kind of
> concurrency which would be really slow.
>


Ford Ranchero Parts


Top
 Profile  
 
 Post subject: Re: ehcache max-elements on collection
PostPosted: Tue Apr 20, 2010 12:20 am 
Newbie

Joined: Tue Apr 06, 2010 8:46 am
Posts: 7
It's nothing to do with concurrency. Only for the max-element limit that the cache keeps in memory before start using the disk or evicting data.

Anyway I experimented a bit and found it's no.2

thanx anyway


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