ibatis-user-java mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Kris A. Jenkins" <krisajenk...@yahoo.co.uk>
Subject Re: cacheModel still hitting database
Date Mon, 21 Feb 2005 23:16:48 GMT
s/atttribute/element/

 --- "Kris A. Jenkins" <krisajenkins@yahoo.co.uk>
wrote: 
> Mark,
> 
> In your sql-map-config.xml, look at the 'settings'
> attribute.  Do you have 'cacheModelsEnabled="true"'
> set?
> 
> Kris
> 
> 
>  --- Mark Bennett <mark.bennett@ncmail.net> wrote: 
> > I'm trying to get the cacheModel working, but it
> > keeps hitting the database.
> > This is just an example so please ignore the
> > context.
> > 
> > I'm using iBatis-2 and this setup returns the data
> > properly.  I get no
> > errors.  This is run through a web container and
> not
> > a unit test so the
> > cache should persist.  The query object is an
> > Integer so it should hash the
> > same each time.  However, whenever I cange the
> data
> > in the databse, the
> > change shows up on the page.  Any advice?  Thanks.
> > 
> > Mark
> > 
> > 
> >   <cacheModel id="drugScreenCache" type="LRU"
> > readOnly="true"
> > serialize="false">
> >     <flushInterval hours="12"/>
> >     <property name="cache-size" value="500"/>
> >   </cacheModel>
> > 
> >   <resultMap id="drugScreenListResult"
> > class="drugScreen">
> >     <result property="id" column="ACTID"/>
> >     <result property="testDate"
> column="TESTDATE"/>
> >   </resultMap>
> > 
> >   <select id="getDrugScreenListByJuvenile"
> >   		resultMap="drugScreenListResult"
> >   		cacheModel="drugScreenCache">
> >     SELECT *
> >     FROM drugscreen
> >     WHERE rsrcid = #value#
> >     ORDER by TESTDATE DESC
> >   </select>
> > 
> > 
> >  
> 
> 
> 	
> 	
> 		
>
___________________________________________________________
> 
> ALL-NEW Yahoo! Messenger - all new features - even
> more fun! http://uk.messenger.yahoo.com
>  


	
	
		
___________________________________________________________ 
ALL-NEW Yahoo! Messenger - all new features - even more fun! http://uk.messenger.yahoo.com

Mime
View raw message