[ 
https://issues.apache.org/jira/browse/CAY-2259?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15904626#comment-15904626
 ] 

Andrus Adamchik edited comment on CAY-2259 at 3/10/17 7:37 AM:
---------------------------------------------------------------

I fixed #1 in Bootique 
(https://github.com/bootique/bootique-cayenne/tree/master/bootique-cayenne-jcache/src/main/java/io/bootique/cayenne/jcache/cache).
 This solution can be ported to Cayenne. The beauty of it is that it is 
backwards compatible in a sense that the code outside Cayenne can now place 
entries in the same caches as Cayenne and they will get invalidated (as well as 
their own untyped caches). #2 above is just icing on the cake solving a problem 
with strictly typed caches and is not strictly required.


was (Author: andrus):
I fixed #1 in Bootique 
(https://github.com/bootique/bootique-cayenne/tree/master/bootique-cayenne-jcache/src/main/java/io/bootique/cayenne/jcache/cache).
 This solution can be ported to Cayenne. The beauty of it is that it is 
backwards compatible in a sense that the code outside Cayenne can now place 
entries in the same caches as Cayenne and they will get invalidated. #2 above 
is just icing on the cake and is not strictly required.

> QueryCache: support for referencing type-safe caches
> ----------------------------------------------------
>
>                 Key: CAY-2259
>                 URL: https://issues.apache.org/jira/browse/CAY-2259
>             Project: Cayenne
>          Issue Type: Task
>    Affects Versions: 4.0.M5
>            Reporter: Andrus Adamchik
>            Assignee: Andrus Adamchik
>
> With cayenne-jcache we lost the ability to invalidate caches not handled by 
> Cayenne. The API for CacheManager's caches introspection requires the caller 
> to know the generic parameters of a named cache. So we can no longer 
> invalidate caches that were not created for Cayenne (and that are known to be 
> of type "Cache<String, List>"). 
> A few changes to address this:
> 1. Internally use "untyped" caches for storage. This would allow the same 
> caches to be reused by the code outside Cayenne.
> 2. Add API to QueryCache to handle invalidation of typed caches with known 
> key and value types. Extend @CacheGroups annotation to specify cache generics 
> "signatures", add support for it in CacheInvalidationFilter.



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)

Reply via email to