Return-Path: Delivered-To: apmail-ibatis-user-java-archive@www.apache.org Received: (qmail 14276 invoked from network); 4 Jul 2007 08:15:02 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 4 Jul 2007 08:15:02 -0000 Received: (qmail 55049 invoked by uid 500); 4 Jul 2007 08:15:01 -0000 Delivered-To: apmail-ibatis-user-java-archive@ibatis.apache.org Received: (qmail 55028 invoked by uid 500); 4 Jul 2007 08:15:00 -0000 Mailing-List: contact user-java-help@ibatis.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: user-java@ibatis.apache.org Delivered-To: mailing list user-java@ibatis.apache.org Received: (qmail 55011 invoked by uid 99); 4 Jul 2007 08:15:00 -0000 Received: from herse.apache.org (HELO herse.apache.org) (140.211.11.133) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 04 Jul 2007 01:15:00 -0700 X-ASF-Spam-Status: No, hits=2.0 required=10.0 tests=HTML_MESSAGE X-Spam-Check-By: apache.org Received-SPF: neutral (herse.apache.org: local policy) Received: from [80.12.242.111] (HELO smtp2e.orange.fr) (80.12.242.111) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 04 Jul 2007 01:14:57 -0700 Received: from me-wanadoo.net (localhost [127.0.0.1]) by mwinf2e02.orange.fr (SMTP Server) with ESMTP id D9068700008A for ; Wed, 4 Jul 2007 10:14:35 +0200 (CEST) Received: from pc01 (LPuteaux-151-42-21-52.w193-252.abo.wanadoo.fr [193.252.108.52]) by mwinf2e02.orange.fr (SMTP Server) with ESMTP id 93D2F7000081 for ; Wed, 4 Jul 2007 10:14:35 +0200 (CEST) X-ME-UUID: 20070704081435605.93D2F7000081@mwinf2e02.orange.fr From: "Gabriel Macerot" To: Subject: IBATIS map and Cache Date: Wed, 4 Jul 2007 10:16:37 +0200 MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="----=_NextPart_000_000B_01C7BE24.67E7E7E0" X-Mailer: Microsoft Office Outlook, Build 11.0.5510 Thread-Index: Ace9iGY8tdWV9TNEQe2aTrqOrdvwtQAiysaA X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.3028 Message-Id: <20070704081435.93D2F7000081@mwinf2e02.orange.fr> X-Virus-Checked: Checked by ClamAV on apache.org This is a multi-part message in MIME format. ------=_NextPart_000_000B_01C7BE24.67E7E7E0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable =20 I build a web application. Then I store data in a mysql data base and I = use ibatis in order to map the requests for my application. For optimization = I use LRU cache with the mapping about game_object_template (these objects = may not change a lot). =20 Here is my code : =20 =20 =20 =20 =20 =20 I used cache system for other request in my application but it seems = here that nothing works like I want and the request still cost a lot of time. There is 300 game_object_templates in my data base and one game object = got 13 field lots of varchar and some int (if it could help). =20 Is someone could explain me why it doesn=92t work or if another solution = exist in order to get these objects (There are often use) ? =20 Mohicane ------=_NextPart_000_000B_01C7BE24.67E7E7E0 Content-Type: text/html; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable

 

I build a web application. Then I store data = in a mysql data base and I use ibatis in order to map the requests for my application. For optimization I use LRU cache with the mapping about game_object_template (these objects may not change a = lot).

 

Here is my code :

 

   

    <!-- Mod=E8le de cache = -->

    <cacheModel = id=3D"GOT.cache" type=3D"LRU">

        = <flushInterval hours=3D"1"/>

        <flushOnExecute statement=3D"GameObjectTemplate.insertOne" = />

        <flushOnExecute statement=3D"GameObjectTemplate.updateOne" = />

        <property name=3D"size" value=3D"750" = />

    = </cacheModel>

    =

    <!-- Getters = -->

    <select id=3D"GameObjectTemplate.getOne" = resultMap=3D"GOT.map" cacheModel=3D"GOT.cache">

        = SELECT * FROM game_object_templates WHERE = id=3D#value#

    = </select>

    =

    <select id=3D"GameObjectTemplate.getOneByName" = resultMap=3D"GOT.map" cacheModel=3D"GOT.cache">

        = SELECT * FROM game_object_templates WHERE = nom=3D#value#

    = </select>

    =

    <!-- List = -->

    <select id=3D"GameObjectTemplate.getAll" = resultMap=3D"GOT.map" cacheModel=3D"GOT.cache">

        = SELECT * FROM game_object_templates got, sous_categories_objets sc, = categories_objets c

        = WHERE got.id_sous_categorie =3D sc.id

        AND sc.id_categorie_objet =3D c.id

        = ORDER BY c.libelle, sc.libelle, got.nom

    = </select>

 

I used cache system for other request in my application but it seems here that nothing works like I want and the = request still cost a lot of time. There is 300 game_object_templates in my data = base and one game object got 13 field lots of varchar and some int (if it = could help).

 

Is someone could explain me why it = doesn’t work or if another solution exist in order to get these objects (There are = often use) ?

 

Mohicane

------=_NextPart_000_000B_01C7BE24.67E7E7E0--