You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@ibatis.apache.org by "Paul Benedict (JIRA)" <ib...@incubator.apache.org> on 2005/11/15 06:17:28 UTC

[jira] Created: (IBATIS-222) Evict from cache

Evict from cache
----------------

         Key: IBATIS-222
         URL: http://issues.apache.org/jira/browse/IBATIS-222
     Project: iBatis for Java
        Type: New Feature
  Components: SQL Maps  
    Versions: 2.1.6    
    Reporter: Paul Benedict


I use the cache mainly to keep in memory objects which are very expensive to create and are retrieved very often throughout the lifetime of my system. These objects are also updatable and so I need to refresh them when an insert/update is called. 

The current implemention allows a <flushOnExecute> tag to define the methods to flush, but this is too coarse. I request an enhancement to allow me to evict only certain objects (specified by primary keys) so that I do not have to flush the entire cache for a single object update. It is too costly to throw away 1000s of objects just for one update.

Either the cache should be exposed through a method so that the developer can programtically evict the correct object or some sort of automated process should do it as such:

<!-- flush the object in the cache having properties id1 & id2 set to the object just passed into insertArticle -->
<flushOnExecute method="insertArticle" id="{id1,id2}" 

I personally prefer having programatic access... at least until IBATIS can do it all for me :)

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira


[jira] Commented: (IBATIS-222) Evict from cache

Posted by "Nathan Maves (JIRA)" <ib...@incubator.apache.org>.
    [ http://issues.apache.org/jira/browse/IBATIS-222?page=comments#action_12360864 ] 

Nathan Maves commented on IBATIS-222:
-------------------------------------

This issue has been discussed many times.  

http://www.mail-archive.com/user-java@ibatis.apache.org/msg02248.html

As of now we are not supporting this type of object identity.

Nathan

> Evict from cache
> ----------------
>
>          Key: IBATIS-222
>          URL: http://issues.apache.org/jira/browse/IBATIS-222
>      Project: iBatis for Java
>         Type: New Feature
>   Components: SQL Maps
>     Versions: 2.1.6
>     Reporter: Paul Benedict

>
> I use the cache mainly to keep in memory objects which are very expensive to create and are retrieved very often throughout the lifetime of my system. These objects are also updatable and so I need to refresh them when an insert/update is called. 
> The current implemention allows a <flushOnExecute> tag to define the methods to flush, but this is too coarse. I request an enhancement to allow me to evict only certain objects (specified by primary keys) so that I do not have to flush the entire cache for a single object update. It is too costly to throw away 1000s of objects just for one update.
> Either the cache should be exposed through a method so that the developer can programtically evict the correct object or some sort of automated process should do it as such:
> <!-- flush the object in the cache having properties id1 & id2 set to the object just passed into insertArticle -->
> <flushOnExecute method="insertArticle" id="{id1,id2}" 
> I personally prefer having programatic access... at least until IBATIS can do it all for me :)

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira