Re: caching of query results

From: Bryan Lewis (brya..aine.rr.com)
Date: Thu Jan 27 2005 - 00:25:37 EST

  • Next message: Giulio Cesare Solaroli: "Re: Errors trying to insert values on Oracle LONG data type with Cayenne"

    Doh. Of course. Thanks. However, when I fix that, I get this exception:

        Caching of unnamed queries is not supported.

    at the performQuery() line.

    The query does have a name... I double-checked with getName().

    ----- Original Message -----
    From: "Robert Zeigler" <rdzeigl...arizona.edu>
    To: <cayenne-use..bjectstyle.org>
    Sent: Wednesday, January 26, 2005 11:35 PM
    Subject: Re: caching of query results

    > >
    > > if (firstTime) {
    > > // Create the query.
    > > query.setName(uniqueName);
    > > myDataMap.addQuery(query);
    > > }
    >
    > The default policy for caching is no cache.
    > Try adding:
    > query.setCachePolicy(/*appropriate cache policy*/);
    > If the cache is supposed to be shared by all clients, do
    > query.setCachePolicy(GenericSelectQuery.SHARED_CACHE);
    > If the cache should be locale to the data context associated with the
    > current user, do:
    > query.setCachePolicy(GenericSelectQuery.LOCAL_CACHE);
    >
    > Robert



    This archive was generated by hypermail 2.0.0 : Thu Jan 27 2005 - 00:25:47 EST