One problem with a cache is if two parts of the program have objects for the same record at the same time. They can fiddle with their local copies and think that they've made the changes they want to make to the database, but the last one to commit wins. Or maybe the record winds up in a strange state. One of them may make a change, and the other never sees it.
If you're planning to cache things at all, you might as well cache entire records at a time. When the object needs any field, get every field. That way you hit the database fewer times.
If you don't cache anything, the performance may indeed be really bad. It might be bad but acceptable—that's a personal preference. Have you tried it?
In reply to Re: not caching to object in code interface to database?
by kyle
in thread not caching to object in code interface to database?
by leocharre
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |