I am developing a DB access module for my SCJDtest. Should this program read all the data in memory and keep them there as long as the server is running? Or should it always search on the disk?
I really appreciate it!
posted 11 years ago
If your instructions never prohibit you from reading all records in memory, then you can use cache definitely. In my design, I do read all records from the file located in the disk to memory when my program is running. After every database operation(updating, deleting or creating) I made the cache and the disk changing simultaneously.