D
Darrel
I thought this warranted a new thread.
Yesterday I asked about access relatively static content...is it better to
read from the DB, or just grab a text file. It was suggested that I use the
DB and look into the Application Cache settings.
I found a good article here:
http://www.developer.com/net/net/article.php/1477771
It mentions that, at least with files, you can set the cache to retain the
information until the file is updated, at which time it will access it again
and re-cache. Can the same be done for a DB? My guess is no, since to check
for the update, it'd have to access the DB, and if it has to do that, it
might as well grab the data while its there.
The catch is that the text in question, though it won't change often, IS
editable via an admin tool and when it's changed, the client would obviously
want to see the change take place...instead of waiting for the cache to
expire. I could set the cache to something like 5 minutes, which might be
acceptable.
Anyways, the final thought was to keep the data in the DB for editing
purposes, but upon each 'save', also write out a text file and then read
that text file in via asp, setting the cache to renew only when the file is
again changed. Does anyone see a problem with that logic?
-Darrel
Yesterday I asked about access relatively static content...is it better to
read from the DB, or just grab a text file. It was suggested that I use the
DB and look into the Application Cache settings.
I found a good article here:
http://www.developer.com/net/net/article.php/1477771
It mentions that, at least with files, you can set the cache to retain the
information until the file is updated, at which time it will access it again
and re-cache. Can the same be done for a DB? My guess is no, since to check
for the update, it'd have to access the DB, and if it has to do that, it
might as well grab the data while its there.
The catch is that the text in question, though it won't change often, IS
editable via an admin tool and when it's changed, the client would obviously
want to see the change take place...instead of waiting for the cache to
expire. I could set the cache to something like 5 minutes, which might be
acceptable.
Anyways, the final thought was to keep the data in the DB for editing
purposes, but upon each 'save', also write out a text file and then read
that text file in via asp, setting the cache to renew only when the file is
again changed. Does anyone see a problem with that logic?
-Darrel