2006/11/15, Michael Gentry <[EMAIL PROTECTED]>:
DB and it worked well. As far as things to pay attention to ... I'd use optimistic locking (which I'd recommend for a web-based application, too) and refresh data you think needs to be refreshed. Refreshing data is really an application/workflow specific detail, so it is hard to generalize. Some things are obvious, like you can cache the State and Zip Code tables, for example. Other things you'll have to evaluate depending on your situation. It hardly ever hurts to refresh data from common queries, unless the query is really slow.
As far as refresh is concerned... Cayenne looks to the database for every query by default, correct? If an object changes after performQuery or getObjectByID returns, how would I go about refreshing the cache? Simply repeat getObjectByID or performQuery? So far I've taken the paranoid approach so everything comes straight from the database (i.e., I haven't paid any attention to the cache): I'll look into the possibilities of caching some tables. which shouldn't change. How does the "max. number of objects" fit into the story? What happens if I run a query which returns more then "max. number of objects" objects (I've tried it, but can't explain the result)? t.n.a.
