Re: [JIRA] Created: (CAY-925) Support Entity/Table scope caching

From: Andrus Adamchik (andru..bjectstyle.org)
Date: Wed Nov 28 2007 - 17:13:13 EST

  • Next message: Detlef Burt: "Replace Objects in a Database?"

    Yes, this is correct. Of course use LOCAL_CACHE only when you think it
    is appropriate (i.e. the data doesn't change within a single user
    session lifespan).

    Also there's new pluggable 3.0 API that would allow you to control
    expiration of the query cache. This should be considered advanced API
    and should only be used if you need this level of control.

    Andrus

    On Nov 29, 2007, at 12:05 AM, Malcolm Edgar wrote:
    > 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 <andru..bjectstyle.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.
    >>>
    >>>
    >>
    >>



    This archive was generated by hypermail 2.0.0 : Wed Nov 28 2007 - 17:14:00 EST