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 "Barrena Legorburu, Juan" <jb...@iberdrola.es> on 2005/07/11 14:27:56 UTC

RV: Problems with the cache


¿How can I use the cache?
I don´t know why the cache is not running............


 I have in sql-map-config.xml
<settings

cacheModelsEnabled="true"

enhancementEnabled="true"

lazyLoadingEnabled="true"

maxRequests="32"

maxSessions="10"

maxTransactions="5"

useStatementNamespaces="false"

/>


and I have in the sql file:

<cacheModel id="cache_consultaFormulario_PE016" type="LRU">

<flushInterval hours="24"/>

<property name="size" value="10000" />

</cacheModel>



<select cacheModel="cache_consultaFormulario_PE016"
id="consultaFormulario_PE016" parameterClass="string"
resultClass="com.iberdrola.wps.portlet.formularios.entidad.bd.Epe016frmFormu
larios">

SELECT PE016_ACTIVADO FROM PE016_FRM_FORMULARIOS where PE016_ID = #value#

</select>






=============================
Este mensaje se dirige exclusivamente a su destinatario.
Puede contener informacion confidencial sometida a secreto profesional o cuya divulgacion
este prohibida, en virtud de la legislacion vigente. No esta permitida su divulgacion,
copia o distribucion a terceros sin la autorizacion previa y por escrito de Iberdrola.
Si ha recibido este mensaje por error, le rogamos nos lo comunique inmediatamente
por esta misma via y proceda a su destruccion.

This e-mail is intended exclusively for the individual or entity to which it is addressed
and may contain confidential or legally privileged information, which may not be disclosed
under current legislation. Any form of disclosure, copying or distribution of this e-mail
is strictly prohibited, save with written authorisation from Iberdrola.
If you have received this message in error, please notify the sender immediately by e-mail
and delete all copies of the message.
=============================

Re: RV: Problems with the cache

Posted by Daniel Henrique Ferreira e Silva <dh...@gmail.com>.
Hi Juan,

What are you trying to do?
Your configurations seem to be OK for me. Looking at your SQL
statement, it seems for me that you're retrieving records from your
table using the primary key. So, when you call that statement, if you
don't use the same value at least twice, it'll always hit the database
to fetch the data you want.
Is that your current situation?

HTH,
Daniel Silva.

On 7/11/05, Barrena Legorburu, Juan <jb...@iberdrola.es> wrote:
>  
> 
> ¿How can I use the cache? 
> I don´t know why the cache is not running............ 
>   
>   
>  I have in sql-map-config.xml 
>  
> 
> <settings 
> 
> cacheModelsEnabled="true" 
> 
> enhancementEnabled="true" 
> 
> lazyLoadingEnabled="true" 
> 
> maxRequests="32" 
> 
> maxSessions="10" 
> 
> maxTransactions="5" 
> 
> useStatementNamespaces="false" 
> 
> /> 
>   
> and I have in the sql file: 
>   
>  
> 
> <cacheModel id="cache_consultaFormulario_PE016" type="LRU">
> 
> <flushInterval hours="24"/> 
> 
> <property name="size" value="10000" /> 
> 
> </cacheModel> 
> 
>   
> 
> <select cacheModel="cache_consultaFormulario_PE016"
> id="consultaFormulario_PE016" parameterClass="string"
> resultClass="com.iberdrola.wps.portlet.formularios.entidad.bd.Epe016frmFormularios">
> 
> SELECT PE016_ACTIVADO FROM PE016_FRM_FORMULARIOS where PE016_ID = #value# 
> 
> </select> 
> 
>  
>  
>  =============================
>  Este mensaje se dirige exclusivamente a su destinatario.
>  Puede contener informacion confidencial sometida a secreto profesional o
> cuya divulgacion
>  este prohibida, en virtud de la legislacion vigente. No esta permitida su
> divulgacion,
>  copia o distribucion a terceros sin la autorizacion previa y por escrito de
> Iberdrola.
>  Si ha recibido este mensaje por error, le rogamos nos lo comunique
> inmediatamente
>  por esta misma via y proceda a su destruccion.
>  
>  This e-mail is intended exclusively for the individual or entity to which
> it is addressed
>  and may contain confidential or legally privileged information, which may
> not be disclosed
>  under current legislation. Any form of disclosure, copying or distribution
> of this e-mail
>  is strictly prohibited, save with written authorisation from Iberdrola.
>  If you have received this message in error, please notify the sender
> immediately by e-mail
>  and delete all copies of the message.
>  =============================
>