Hi,
I have an application in which the data shown on the main page comes from the database and remains static for a period of time. like say 1-2 days, and it changes after that.
Now, since that data is on the main page and will be accessed frequently, i dont want to query the database each and every time.
So, what i plan to do is while starting the application, have a startup
servlet, put the data in the application scope and after each day, a
thread will run which will take the latest
data from the DB, and replace the data in the application scope..
Now, the problem is that i am not sure how much it will impact the performance if i have put the data in the application scope.
I plan to put around 40-50 rows from a table, having around 4 columns each.
Is it a decent idea to put this much of data in the application scope and not go to the DB every time.
Also, "roughly" how much will the performance be affected?
Any other comments/ideas regarding the same are greatly appreciated.
Thanks,