Re: Caching-Problems

From: Jürgen Saar (jsaa..eb.de)
Date: Thu Dec 08 2005 - 03:15:45 EST

  • Next message: Andrus Adamchik: "Re: Caching-Problems"

    First of all ... sorry, but I really had no more ideas

    I searched for caching-switches on Maps.
    I never thought it could be cayenne-global

    I always use a new DataContext but some data
    behaved like static finals

    For the kind of problem I have to solve, caching is
    really bad, because there is a lot of data-changing
    within the database coming from at least 3 sources:
    - Cayenne
    - Non-Java-Rich-Clients
    - Cronjobs

    One more Question:
    would setRefreshingObjects(Boolean.TRUE) on SelectQuery help on my problem?

    cayenne-use..bjectstyle.org schrieb am 07.12.05 08:43:07:
    >
    > Jürgen,
    >
    > Your broad remark has nothing to do with Joseph's question that has a
    > simple and trivial solution. From this post and some other of your
    > earlier posts, I think you misunderstood how caching works. You do
    > realize that caching is not some inevitable evil, but simply another
    > useful feature? You are free to turn it off.
    >
    > Good thing about Cayenne caching is that you can tweak what to cache
    > and what to refresh, giving you the best performance in your specific
    > situation, but you can always opt out of it all together. Here is a
    > few tips that will hopefully clear the confusion:
    >
    > (1) SelectQuery with properly configured prefetches will go a long
    > way in providing you with fresh objects on every request. This way
    > you are in control of refreshing parts of the object graph.
    >
    > (2) Combine (1) with replacing a DataContext on every request (i.e.
    > do not store DataContext in the session). Don't use DataObjectUtils
    > for PK lookup (this is just a shortcut; you can use a SelectQuery
    > that refreshes data).
    >
    > (3) If this is still not enough, you can configure Cayenne stack to
    > avoid cache between multiple DataContexts. Simply uncheck "Use Shared
    > Cache" checkbox for the DataDomain in the Modeler. See the first
    > picture on this page for explanation:
    >
    > http://objectstyle.org/cayenne/userguide/design/caching.html
    >
    > Andrus
    >

    ______________________________________________________________
    Verschicken Sie romantische, coole und witzige Bilder per SMS!
    Jetzt bei WEB.DE FreeMail: http://f.web.de/?mc=021193



    This archive was generated by hypermail 2.0.0 : Thu Dec 08 2005 - 03:15:56 EST