D
darrel
I have bits of content on a site that's running of a basic CMS system I've
built.
The main content on each page is pulled in from the DB, so there's at least
one call to the DB on each page load.
But then there's content like the page footer, which is rarely updated, and
is the same on every page.
Since this is rarely updated, but initial thought was to store it in the DB,
but whenever it is edited, spit it out as a text file. Then I could use SSI
and just include it on all of the pages. The problem with the include is
that I want to include it on a usercontrol, and IIRC, the controls are
executed prior to includes, so instead, I can use a objStreamReader to read
in the file.
My first question is if reading a file via objStreamReader is any different
performance-wise than using server side includes?
My second question is if I should instead consider using an actual DB call
to grab the data, but then setting it in a session state. That way it is
only called once per user per session, and then stored in memory from page
to page. Or does that matter?
-Darrel
built.
The main content on each page is pulled in from the DB, so there's at least
one call to the DB on each page load.
But then there's content like the page footer, which is rarely updated, and
is the same on every page.
Since this is rarely updated, but initial thought was to store it in the DB,
but whenever it is edited, spit it out as a text file. Then I could use SSI
and just include it on all of the pages. The problem with the include is
that I want to include it on a usercontrol, and IIRC, the controls are
executed prior to includes, so instead, I can use a objStreamReader to read
in the file.
My first question is if reading a file via objStreamReader is any different
performance-wise than using server side includes?
My second question is if I should instead consider using an actual DB call
to grab the data, but then setting it in a session state. That way it is
only called once per user per session, and then stored in memory from page
to page. Or does that matter?
-Darrel