cayenne-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Malcolm Edgar" <malcolm.ed...@gmail.com>
Subject Re: [JIRA] Created: (CAY-925) Support Entity/Table scope caching
Date Wed, 28 Nov 2007 22:05:03 GMT
Hi Andrus,

Thanks for the advice. To do this I presume I need to have Level 2 (local
VM) caching enabled, and then set caching policy as appropriate for the
query:

// For most of the queries
QueryMetadata.LOCAL_CACHE

// For cached lookup data
QueryMetadata.SHARED_CACHE

regards Malcolm Edgar


On Nov 28, 2007 8:47 PM, Andrus Adamchik <andrus@objectstyle.org> wrote:

> Malcolm,
>
> Cayenne already supports this via query caching. Check
> SelectQuery.setCachePolicy(..). The policy can be either of
> QueryMetadata.LOCAL_CACHE, QueryMetadata.LOCAL_CACHE_REFRESH,
> QueryMetadata.SHARED_CACHE, QueryMetadata.SHARED_CACHE_REFRESH (should
> probably define them as enums in 3.0).
>
> Andrus
>
>
> On Nov 27, 2007, at 11:58 PM, Malcolm Edgar (JIRA) wrote:
>
> > Support Entity/Table scope caching
> > ----------------------------------
> >
> >                Key: CAY-925
> >                URL: https://issues.apache.org/cayenne/browse/CAY-925
> >            Project: Cayenne
> >         Issue Type: New Feature
> >         Components: Cayenne Core Library, CayenneModeler GUI
> >   Affects Versions: 3.0
> >           Reporter: Malcolm Edgar
> >           Assignee: Andrus Adamchik
> >
> >
> > On most of our projects we do not use caching, because of the size
> > of the databases, and or issues of multiple applications writing to
> > the database.  However one feature we would really like is to be
> > able to specify that individual tables/entities are cached in memory
> > by Cayenne.
> >
> > This is typically for UI lookup values which change very
> > infrequently, or deployment properties which also change
> > infrequently. By caching this information in memory we can
> > significantly reduce the number of requests made to the database and
> > improve application performance.
> >
> > --
> > This message is automatically generated by JIRA.
> > -
> > You can reply to this email to add a comment to the issue online.
> >
> >
>
>

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message