G
Guest
Can anybody clarify this please.
Is there any problem in a web app of saving an object in a public variable
as opposed to saving it in the cache?
In my case, I have an object containing a hash table of text labels and
their keys which I save in a public variable.
Any access to the object causes it to check if it has been initialised, and
if not it loads the hash table from the database, at which point it logs a
message to indicate the load has occurred. On examination of the log, I only
see it load once when the application starts, which is waht I want it to do.
The question is, am I going to have some problem doing it this way, and if
not, what benefit does the cache object have?
Thanks
Rick Gwadera
Software designer, programmer etc.
Is there any problem in a web app of saving an object in a public variable
as opposed to saving it in the cache?
In my case, I have an object containing a hash table of text labels and
their keys which I save in a public variable.
Any access to the object causes it to check if it has been initialised, and
if not it loads the hash table from the database, at which point it logs a
message to indicate the load has occurred. On examination of the log, I only
see it load once when the application starts, which is waht I want it to do.
The question is, am I going to have some problem doing it this way, and if
not, what benefit does the cache object have?
Thanks
Rick Gwadera
Software designer, programmer etc.