ibatis-user-java mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Garmilla, Santhosh {PBG}" <Santhosh.Garmi...@pepsi.com>
Subject Caching is it Querybased or paramater based or both ?
Date Thu, 02 Dec 2004 21:22:35 GMT
Hi All, 

I have a Query : 

<statement id="getCodesFromDB"
resultClass="com.pbg.mware.mfiles.client.data.CodeDetail"
parameterClass="java.lang.Integer" cacheModel="staticcodes-cache"> 
SELECT 
TABLE_ID as id , 
CODE_VAL as codeVal , 
CODE_VAL_DESCR as codeValDescr, 
USER_ID as createdBy , 
CODE_ACTV_FLG as codeActvFlg, 
LOCK_DTE_TME as lastUpdate 
FROM 
COMMON..CODE_DETL 
WHERE TABLE_ID=#value# 
</statement> 


When i Make a First Query with Parameter value=511, Iam retrieving values
from database and getting stored in Cache(Using Oscache) as a Key .But for
next if i make a Query with value=510 , it is displaying old values for
which i got from Query 511 . 

How to make Caching based on the Parameter and Query. 

Please Help me out. 

Thanks in Advance 

Santhosh.



Mime
View raw message