From: Frank B. <fb...@fo...> - 2003-04-16 22:18:36
|
Hallo, Ian Bicking hat gesagt: // Ian Bicking wrote: > I was thinking of something like that, only calling it .refresh(). What > bothered me was if you do this at, say, the beginning of a request you > may be confused when some other request does the same thing, and the > object gets refreshed in the middle of your request. > > I'm thinking there needs to be some consolidation of the different ways > instances act with respect to threads. There's a few use cases I can > see: [...] > * You want a live instance of the object, attached directly to the > database. No caching should occur. There's no reason not to share this > instance between threads, as far as I can see. Maybe the last one might be what I currently need. Caching is okay (for performance reasons probably needed), but I need changes to be visible on all Pages. But then maybe the problem _I_ have has nothing to do with the caching, I'm not sure. I just checked in the application I'm working on into the webware-sandbox under Sandbox/fbar/survey, so if you'd like to take a look? It's a survey we want to do with the visitors of our website. Edit-pages will let our editors add and change the questions and their answers. Now I can change the questions without problems, changes are immediatly visible. But not so the answers, which get pulled from the DB per joins over the Questions. That is, a Question has multiple answers: Question "q" Since when do you know us? Answers "q.answers" [ ] 1996 [ ] 1997 ... [ ] 20022 [ ] 2003 The "Answers" tree is build via "for a in q.answers: ..." Now if I change the answers in a web form, to correct the "20022" mistake, this is seen immediatly in the database, but even with strong browser reloads (Ctl-Shift-Reload,... ;) it is not seen in the Pages. ciao -- Frank Barknecht _ ______footils.org__ |