Posted By:
Joost_Schouten
Posted On:
Saturday, March 29, 2003 02:30 PM
Hi, I'm building a webapp which does frequent database calls. Sometimes the calls are extensive and involve populating 1000s of beans. Let say I need to select all my 5000 users from my users table, the userBean holds the company he/she works for, retreived from the companies table, and the array of projects he/she is working on retreived from the projects table. As you can understand a lot of double calls are preformed, since a lot of people work on the same projects, or for the same company. I'm in the prosess of setting up a cache system that will save every bean retreived from the databse, and return it on the next call. However, the caching cannot exceed the span of one http request. Since on a next call the entry mig
More>>
Hi,
I'm building a webapp which does frequent database calls. Sometimes the calls are extensive and involve populating 1000s of beans. Let say I need to select all my 5000 users from my users table, the userBean holds the company he/she works for, retreived from the companies table, and the array of projects he/she is working on retreived from the projects table.
As you can understand a lot of double calls are preformed, since a lot of people work on the same projects, or for the same company. I'm in the prosess of setting up a cache system that will save every bean retreived from the databse, and return it on the next call. However, the caching cannot exceed the span of one http request. Since on a next call the entry might have changed.
Now here is my question. Is it common practice to cache my entire database upon startup, and modify the databse and cache when changes occur. This should significantly decrease the prosessing time right?
Any comments and/or recomendations on how to optimize data retreival through caching the entry beans retreived.
Thanks,
Joost
<<Less