Title: Caching is it Querybased or paramater based or both ?

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.

Reply via email to