I'm reading in a file through my application and right now every time a
user goes to the page, the file is being read in and parsed etc etc to be
formatted for display. Now, I know this can hamper performance
dramatically as the users increase, and I want to be able to make this
task work optimally.
The file is also being updated through FTP every 15 minutes, and I want to
be able to have the correct version read in when a user accesses the page.
My first question is whether this is a good way of going about getting and
presenting the information?
Secondly, I want to somehow store the Vector of lines from the file
globally so that all the users can use it. I want to store the Vector, and
a timestamp consisting of the file's last modification date in order to do
a check of whether to access the current Vector, or read in the file again
and refresh the timestamp all across the application (so the one user to
be reading the file during the time that a new file comes in will update
it for all other users). What's the best way to go about doing this?
*** Also - If you are familiar with tags, I'd like to know how I can add
this functionality to my current tags (one which reads the file, and the
other which displays the Vector of lines). I'm not sure how to have the
tag just read in session attributes, or just variables that reside on the
page.
I really really appreciate your time and help in this matter,
Thank you,
Lior