cayenne-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Andrus Adamchik (JIRA)" <>
Subject [jira] Created: (CAY-1537) Implement ObjectContext local caches as NestedQueryCache over the shared cache
Date Sun, 30 Jan 2011 11:16:45 GMT
Implement ObjectContext local caches as NestedQueryCache over the shared cache

                 Key: CAY-1537
             Project: Cayenne
          Issue Type: Task
          Components: Core Library
    Affects Versions: 3.1M2
            Reporter: Andrus Adamchik
            Assignee: Andrus Adamchik

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.
You can reply to this email to add a comment to the issue online.

View raw message