Hi,
I've been doing a bit of reading about
JSP and have a question about keeping objects in memory. Here goes...
I have an object which is created from a whole load of data in a database. The object is essentially content for the website, but because of the nature of the content, I need to load all of the content in order to get the necessary bits out that the user has specifically requested. There is a reason for this, so bear with me.
Anyway, the content does not change very often, but the requests for the object are obviously numerous (every page request in fact).
So here's my question: is there any way to cache the object so that it only goes back to the database when the content has been updated? Basically, I want to hold the object in memory so that it doesn't need to be re-created between page requests - only if the content has been changed. Ideally, also, I don't want the object to be related to a user session, but global read-only (if that makes sense).
The software is not built in
J2EE and I can't move to J2EE to solve this problem.
Any help is much appreciated. I realise it's not a very specific question.
Thanks in advance,
Steve