posted 20 years ago
Hello George
I haven't read the other topics about caching, but I don�t think that a cached database in this case needs to be that difficult to implement. Load all records into some in-memory collection, and then allow all the reads on it, but only write through to the file on actions that update the content. Note, that I am doing the FBN version, so this could be different in your version.
The above mentioned solution could be implemented quite easily, and give you a performance increase. Weather or not performance is an issue, that is the question, then. My assignment states that I should prioritize simplicity, and create code that a junior programmer could understand, over code optimized for performance.
But I think a scheme as outlined above would be simple enough. I do not think that it is necessary for the Developer assignment, however, since the scale of the application wont suffer from a bit of performance penalty. Cached or not cashed, I think both are acceptable. The important thing is to remember to describe your choice, and motivation for it, in the design decisions document.
Regards,
Flemming Mertz