-->
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: Problem with concurrent cache updates
PostPosted: Wed Nov 01, 2006 6:09 pm 
Newbie

Joined: Sat Aug 19, 2006 7:15 am
Posts: 2
Good day!

There is multiple update of stale cache entries. I've used EhCache and OSCache, but result is still the same.

I've written high concurrency site with heavy database queries (using Criteria queries). I've set up cache for 5 minutes expiring interval. So, each 5 minutes many users trying to load main page of my site, and there is many identical queries to database while query for first user doesn't completed and its results have been put in cache. So, site works too slow every 5 minutes...

Can I block other threads while first thread updates stale cache entry? Or can I give stale cashe entry value for other threads?

Thank you!


P.S.:
What I've tried in ehcache:
I've tried BlockingCache . SelfPopulatingCache, but it looks like this types of cache doesn't supports by hibernate.

What I've tried in oscache:
I've tried to use cache.blocking=false and cache.blocking=true in oscache.properties, but there is concurrent updates of stale enties in both cases :(


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.