Cayenne doesn't care about staleness. It's the application's
task to ensure that Pojo networks are updated to the current
DB state at the beginning of an application-side transaction.
If data isn't available yet, just load it - and accept the
risk that the application may now be working with partly
stale, partly current data.
Are you sure that this is correct?
I'm not, I'm just inferring that from the fact that
a) Cayenne is recreating connections as needed, so it cannot rely on transactional repeatable-read properties and
b) assuming that rechecking all cached records for being up-to-date whenever anything else is loaded or stored.
And in the critical data, Cayenne is able to present the
DBClient modified data immediately.
This may be a side effect of having a webapp.
It might be reloading all data on each request (that's what webapps often do). Or it might be refreshing all relevant data on each request.
For the most part, I have seen that the *default* Cayenne
behavior handles the "stale" issue pretty well. (This is,
if changing data directly in the database, and then having
Cayenne immediately display it via a webpage is an
appropriate black-box test)
If that works without explicit programming, that would be awesome!
But how would Cayenne achieve that and still have reasonable performance?

Search Discussions

Discussion Posts


Follow ups

Related Discussions

Discussion Navigation
viewthread | post
posts ‹ prev | 26 of 39 | next ›
Discussion Overview
groupuser @
postedMar 28, '12 at 8:27a
activeApr 10, '12 at 3:18p



site design / logo © 2022 Grokbase