-->
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: question on ehcaching and oscaching
PostPosted: Tue Mar 13, 2007 2:27 am 
Beginner
Beginner

Joined: Tue Dec 12, 2006 7:52 am
Posts: 20
hi

i have one doubt on caching . i am using ehcaching configure like this
<property name="hibernate.cache.provider_class">org.hibernate.cache.EhCacheProvider</property>
that is configured in hibernate-cfg.xml file
and hbm file configuration is.
<cache usage="read-write" include="all" />
the cache usage mode is read-write

<diskStore path="E:\cache"/>
<defaultCache
maxElementsInMemory="10000"
eternal="false"
timeToIdleSeconds="120"
timeToLiveSeconds="120"
overflowToDisk="true"
diskPersistent="false"
diskExpiryThreadIntervalSeconds="120"
/>

<cache name="com.gss.dto.stud"
maxElementsInMemory="200"
eternal="true"

diskPersistent="true"
overflowToDisk="true"
/>
the configuring like above

suppose i am inserting the data into the data base at that time the records are stored on the database and it creates the data file and index file is generated on the disk it is ok
i am using same configuration but i am reteriving the data from the database in this situation i have one doubt i am getting the data confusion is here the data is getting from the disk or form the database please any one help me for this question


Top
 Profile  
 
 Post subject: Re: question on ehcaching and oscaching
PostPosted: Tue Mar 13, 2007 3:13 am 
Newbie

Joined: Wed Mar 07, 2007 3:26 am
Posts: 16
Location: Hyderabad,India
narenderreddy wrote:
hi

i have one doubt on caching . i am using ehcaching configure like this
<property name="hibernate.cache.provider_class">org.hibernate.cache.EhCacheProvider</property>
that is configured in hibernate-cfg.xml file
and hbm file configuration is.
<cache usage="read-write" include="all" />
the cache usage mode is read-write

<diskStore path="E:\cache"/>
<defaultCache
maxElementsInMemory="10000"
eternal="false"
timeToIdleSeconds="120"
timeToLiveSeconds="120"
overflowToDisk="true"
diskPersistent="false"
diskExpiryThreadIntervalSeconds="120"
/>

<cache name="com.gss.dto.stud"
maxElementsInMemory="200"
eternal="true"

diskPersistent="true"
overflowToDisk="true"
/>
the configuring like above

suppose i am inserting the data into the data base at that time the records are stored on the database and it creates the data file and index file is generated on the disk it is ok
i am using same configuration but i am reteriving the data from the database in this situation i have one doubt i am getting the data confusion is here the data is getting from the disk or form the database please any one help me for this question



hi narender ! it will retrieve from disk store but whenever u r using caching concept the thing it follows is it maintains synchronous state between database and persistent classes.so it need to hit DB once and gets the disk file reference and it retrieves from disk file only . thus improves performence..........

_________________
sam


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.