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..........