You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user-java@ibatis.apache.org by Niels Beekman <n....@wis.nl> on 2007/11/01 13:37:05 UTC
RE: Caching problem using IBATIS
Did you enable caching globally in the config file?
Niels
-----Original Message-----
From: Odelya Glick [mailto:odelya@jpost.com]
Sent: vrijdag 2 november 2007 1:33
To: user-java@ibatis.apache.org
Subject: Caching problem using IBATIS
Hi,
I am trying to implement cache in IBATIS.
I declared the following statement:
<select id="getObituaryById" resultClass="obituary"
parameterClass="string" cacheModel="obituaryCache">
select ID as id,
FIRST_NAME as firstName, MID_NAME as midName, SUR_NAME
as
surName, BIRTH_DATE as birthDate, PASS_DATE as passDate,
BODY as
body, PHOTO_LINK as photoLink, THUMB_PHOTO_LINK as
thumbPhotoLink FROM OBITUARY where ID =
#value#
</select>
And the cacheModel:
<cacheModel id="obituaryCache" type="LRU">
<flushInterval hours="24" />
<property name="cache-size" value="1000" />
<flushOnExecute statement="insertObituary" />
</cacheModel>
But it doesn't seem to be that the obituary object is being cached!
When I change a value in Oracle 9i, and do refresh to the page, I get
the
newly updated information!
The code to get the information is:
public ObituaryData getObituaryById(String obitId) {
return (ObituaryData)
queryForObject("getObituaryById",
obitId);
}
Thanks
Odelya
web-programmer
RE: Caching problem using IBATIS
Posted by Odelya Glick <od...@jpost.com>.
I thought it's default to be true..
I set it now and it works perfect.
Thanks
-----Original Message-----
From: Niels Beekman [mailto:n.beekman@wis.nl]
Sent: Thursday, November 01, 2007 2:37 PM
To: user-java@ibatis.apache.org
Subject: RE: Caching problem using IBATIS
Did you enable caching globally in the config file?
Niels
-----Original Message-----
From: Odelya Glick [mailto:odelya@jpost.com]
Sent: vrijdag 2 november 2007 1:33
To: user-java@ibatis.apache.org
Subject: Caching problem using IBATIS
Hi,
I am trying to implement cache in IBATIS.
I declared the following statement:
<select id="getObituaryById" resultClass="obituary"
parameterClass="string" cacheModel="obituaryCache">
select ID as id,
FIRST_NAME as firstName, MID_NAME as midName, SUR_NAME
as
surName, BIRTH_DATE as birthDate, PASS_DATE as passDate,
BODY as
body, PHOTO_LINK as photoLink, THUMB_PHOTO_LINK as
thumbPhotoLink FROM OBITUARY where ID =
#value#
</select>
And the cacheModel:
<cacheModel id="obituaryCache" type="LRU">
<flushInterval hours="24" />
<property name="cache-size" value="1000" />
<flushOnExecute statement="insertObituary" />
</cacheModel>
But it doesn't seem to be that the obituary object is being cached!
When I change a value in Oracle 9i, and do refresh to the page, I get
the
newly updated information!
The code to get the information is:
public ObituaryData getObituaryById(String obitId) {
return (ObituaryData)
queryForObject("getObituaryById",
obitId);
}
Thanks
Odelya
web-programmer
****************************************************************************
********
This footnote confirms that this email message has been scanned by
PineApp Mail-SeCure for the presence of malicious code, vandals & computer
viruses.
****************************************************************************
********