You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cayenne.apache.org by "Evgeny Ryabitskiy (JIRA)" <ji...@apache.org> on 2010/07/14 11:14:49 UTC

[jira] Created: (CAY-1465) Triggering removeGroup on update/delete/insert query

Triggering removeGroup on update/delete/insert query
----------------------------------------------------

                 Key: CAY-1465
                 URL: https://issues.apache.org/jira/browse/CAY-1465
             Project: Cayenne
          Issue Type: New Feature
          Components: Core Library
    Affects Versions: 3.0, 3.1M1
            Reporter: Evgeny Ryabitskiy
             Fix For: 3.1M1


It can be useful for this case:

I have 2 selects (NamedQueries) for table Artists, which have SHARED
cache policy:

MyArtistsSelectQuery1 from group ArtistsTableGroup:
select * from Artists where isModern = 0

MyArtistsSelectQuery2 from group ArtistsTableGroup:
select * from Artists where isModern = 1

And one insert:
MyArtistsInsertQuery1
insert into Artists values (....) .....

Select NamedQueries are marked by properties in XML
               <property name="cayenne.GenericSelectQuery.cacheStrategy"
value="SHARED_CACHE"/>
               <property name="cayenne.GenericSelectQuery.cacheGroups"
value="ArtistsTableGroup"/>

So, I would like to mark insert query as trigger for cache group
removingin SHARED cache, like implicit execution of:
domain.getQueryCache().removeGroup("ArtistsTableGroup");
after successful insert.

some property like:
  <property name="cayenne.GenericSelectQuery.removeGroups"
value="ArtistsTableGroup"/>

I think it can be very useful.


-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (CAY-1465) Triggering removeGroup on update/delete/insert query

Posted by "Andrus Adamchik (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/CAY-1465?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12888284#action_12888284 ] 

Andrus Adamchik commented on CAY-1465:
--------------------------------------

I suggest just map event listeners to do cache invalidation. Creating extra mapping rules seems like too much trouble.

> Triggering removeGroup on update/delete/insert query
> ----------------------------------------------------
>
>                 Key: CAY-1465
>                 URL: https://issues.apache.org/jira/browse/CAY-1465
>             Project: Cayenne
>          Issue Type: New Feature
>          Components: Core Library
>    Affects Versions: 3.0, 3.1M1
>            Reporter: Evgeny Ryabitskiy
>             Fix For: 3.1M1
>
>
> It can be useful for this case:
> I have 2 selects (NamedQueries) for table Artists, which have SHARED
> cache policy:
> MyArtistsSelectQuery1 from group ArtistsTableGroup:
> select * from Artists where isModern = 0
> MyArtistsSelectQuery2 from group ArtistsTableGroup:
> select * from Artists where isModern = 1
> And one insert:
> MyArtistsInsertQuery1
> insert into Artists values (....) .....
> Select NamedQueries are marked by properties in XML
>                <property name="cayenne.GenericSelectQuery.cacheStrategy"
> value="SHARED_CACHE"/>
>                <property name="cayenne.GenericSelectQuery.cacheGroups"
> value="ArtistsTableGroup"/>
> So, I would like to mark insert query as trigger for cache group
> removingin SHARED cache, like implicit execution of:
> domain.getQueryCache().removeGroup("ArtistsTableGroup");
> after successful insert.
> some property like:
>   <property name="cayenne.GenericSelectQuery.removeGroups"
> value="ArtistsTableGroup"/>
> I think it can be very useful.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.