You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cayenne.apache.org by "Dzmitry Kazimirchyk (JIRA)" <ji...@apache.org> on 2011/08/23 17:27:29 UTC

[jira] [Closed] (CAY-1537) Implement ObjectContext local caches as NestedQueryCache over the shared cache

     [ https://issues.apache.org/jira/browse/CAY-1537?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Dzmitry Kazimirchyk closed CAY-1537.
------------------------------------

       Resolution: Fixed
    Fix Version/s: 3.1M3

Implemented this using NestedQueryCaches over the singleton QueryCache, injected from DI-container, for allObjectContexts.

> Implement ObjectContext local caches as NestedQueryCache over the shared cache
> ------------------------------------------------------------------------------
>
>                 Key: CAY-1537
>                 URL: https://issues.apache.org/jira/browse/CAY-1537
>             Project: Cayenne
>          Issue Type: Task
>          Components: Core Library
>    Affects Versions: 3.1M2
>            Reporter: Andrus Adamchik
>            Assignee: Andrus Adamchik
>             Fix For: 3.1M3
>
>
> Now that CAY-1445 is in place and QueryCache is DI-managed, we can optimize the cache management and improve the API. We may open subtasks as we proceed with implementation:
> 1. Predictable memory use: The idea is to use a single query cache object per stack and allocate "subspaces" within this cache for individual ObjectContext local caches. This will ensure more predictable memory use in an application, as a single cache size policy will cover the entire application. We have a previously unused org.apache.cayenne.cache.NestedQueryCache class that implements this concept. (per CAY-1445 we started using it for the first time for nested contexts ... we'll see how successful it is). We can use it for top level ObjectContexts, and maybe think how to optimize key mapping. 
> 2. More generic cache interface. There's a possible benefit of refactoring QueryCache API to use a more generic put/get that takes a String key instead of QueryMetadata. That simplifies implementing Cayenne cache on top of a general purpose cache used by a given application (I had to deal with this issue myself). This may also take us closer to building a single cache (single storage-wise) for objects and lists.

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira