Re: cayenne in a (rich) client/server setup

From: Andrus Adamchik (andru..bjectstyle.org)
Date: Wed Nov 15 2006 - 14:36:00 EST

  • Next message: Øyvind Harboe: "Re: DataPort"

    On Nov 15, 2006, at 2:14 PM, Michael Gentry wrote:

    > Named queries and the getObject* will/can use the object cache.

    Only if cache policy is set on named queries.

    > Normal queries should refresh.

    Only if cache policy is not set.

    So there is no difference between the queries created in the API and
    mapped in the Modeler as far as caching is concerned:

    http://cwiki.apache.org/CAYDOC/caching-query-results.html

    DataContext.performQuery(String,Map,boolean) mentioned in the docs
    was a way to refresh the cache that should be considered obsolete now
    (I think).

    > I'm not totally clear on the object cache workings. I know I've had
    > things live for weeks in it before (actually helped us out with a
    > production problem -- we could get the old data and print it so we
    > didn't lose it, but I'd argue that was a bad design decision on my
    > part).

    Till 3.0 query cache didn't have expiration date. Now it does.

    > There was talk about adding new cache options to 3.0, but I
    > don't believe you are using that branch? (I think Andrus may have
    > added LRU functionality or similar?)

    Yes, and a bit more - an ability to define cache expiration
    algorithms via a factory:

    http://www.mail-archive.com/cayenne-use..ncubator.apache.org/
    msg01196.html

    Andrus



    This archive was generated by hypermail 2.0.0 : Wed Nov 15 2006 - 14:36:27 EST