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 avalerio1 <av...@cox.net> on 2007/08/08 21:44:44 UTC
Caching question
I've implemented the LRU caching model here's the config:
<cacheModel id="a-cache" type ="LRU" readOnly="false" serialize="true">
<flushInterval hours="12"/>
<property name="cache-size" value="1000" />
</cacheModel>
Now here's the question: Do I have to flush the cache myself after an update
to a table? If I query a table that returns 4 rows then add or delete a row,
when I query the table after the update I get the same 4 rows returned
initially.
Thanks.
--
View this message in context: http://www.nabble.com/Caching-question-tf4238620.html#a12060474
Sent from the iBATIS - User - Java mailing list archive at Nabble.com.
Re: Caching question
Posted by Christopher Lamey <cl...@localmatters.com>.
The answer to that question and your previous one are both in the iBATIS
SqlMaps PDF on page 42:
http://svn.apache.org/repos/asf/ibatis/trunk/java/docs/en/iBATIS-SqlMaps-2_e
n.pdf
Cheers,
topher
On 8/9/07 6:26 AM, "avalerio" <av...@andrewscg.com> wrote:
>
> Thanks for the reply, one more question if you don't mind: since we have to
> flush the cache ourselves, what's the difference between setting the
> 'readonly' attribute true or false?
>
> AV
>
>
> Chris Lamey wrote:
>>
>> You can use the:
>>
>> <flushOnExecute statement="somequeryname"/>
>>
>> To automatically flush a specific cache when a specific query is run.
>>
>> Cheers,
>> Chris
>>
>> On 8/8/07 1:44 PM, "avalerio1" <av...@cox.net> wrote:
>>
>>>
>>> I've implemented the LRU caching model here's the config:
>>> <cacheModel id="a-cache" type ="LRU" readOnly="false" serialize="true">
>>> <flushInterval hours="12"/>
>>> <property name="cache-size" value="1000" />
>>> </cacheModel>
>>> Now here's the question: Do I have to flush the cache myself after an
>>> update
>>> to a table? If I query a table that returns 4 rows then add or delete a
>>> row,
>>> when I query the table after the update I get the same 4 rows returned
>>> initially.
>>> Thanks.
>>
>>
>>
Re: Caching question
Posted by avalerio <av...@andrewscg.com>.
Thanks for the reply, one more question if you don't mind: since we have to
flush the cache ourselves, what's the difference between setting the
'readonly' attribute true or false?
AV
Chris Lamey wrote:
>
> You can use the:
>
> <flushOnExecute statement="somequeryname"/>
>
> To automatically flush a specific cache when a specific query is run.
>
> Cheers,
> Chris
>
> On 8/8/07 1:44 PM, "avalerio1" <av...@cox.net> wrote:
>
>>
>> I've implemented the LRU caching model here's the config:
>> <cacheModel id="a-cache" type ="LRU" readOnly="false" serialize="true">
>> <flushInterval hours="12"/>
>> <property name="cache-size" value="1000" />
>> </cacheModel>
>> Now here's the question: Do I have to flush the cache myself after an
>> update
>> to a table? If I query a table that returns 4 rows then add or delete a
>> row,
>> when I query the table after the update I get the same 4 rows returned
>> initially.
>> Thanks.
>
>
>
--
View this message in context: http://www.nabble.com/Caching-question-tf4238620.html#a12071524
Sent from the iBATIS - User - Java mailing list archive at Nabble.com.
Re: Caching question
Posted by avalerio <av...@andrewscg.com>.
Thanks.
Chris Lamey wrote:
>
> You can use the:
>
> <flushOnExecute statement="somequeryname"/>
>
> To automatically flush a specific cache when a specific query is run.
>
> Cheers,
> Chris
>
> On 8/8/07 1:44 PM, "avalerio1" <av...@cox.net> wrote:
>
>>
>> I've implemented the LRU caching model here's the config:
>> <cacheModel id="a-cache" type ="LRU" readOnly="false" serialize="true">
>> <flushInterval hours="12"/>
>> <property name="cache-size" value="1000" />
>> </cacheModel>
>> Now here's the question: Do I have to flush the cache myself after an
>> update
>> to a table? If I query a table that returns 4 rows then add or delete a
>> row,
>> when I query the table after the update I get the same 4 rows returned
>> initially.
>> Thanks.
>
>
>
--
View this message in context: http://www.nabble.com/Caching-question-tf4238620.html#a12071076
Sent from the iBATIS - User - Java mailing list archive at Nabble.com.
Re: Caching question
Posted by Christopher Lamey <cl...@localmatters.com>.
You can use the:
<flushOnExecute statement="somequeryname"/>
To automatically flush a specific cache when a specific query is run.
Cheers,
Chris
On 8/8/07 1:44 PM, "avalerio1" <av...@cox.net> wrote:
>
> I've implemented the LRU caching model here's the config:
> <cacheModel id="a-cache" type ="LRU" readOnly="false" serialize="true">
> <flushInterval hours="12"/>
> <property name="cache-size" value="1000" />
> </cacheModel>
> Now here's the question: Do I have to flush the cache myself after an update
> to a table? If I query a table that returns 4 rows then add or delete a row,
> when I query the table after the update I get the same 4 rows returned
> initially.
> Thanks.