in reply to Re: pulling content from db - is it a good idea?
in thread pulling content from db - is it a good idea?
It is very easy to fall into the trap of serving up everything dynamically. I did that a few projects back and had to do some major re-writing as the site became popular. From serving 100% of the site dynamically it i snow served about 95% statically. But all of the static pages are dynamically created.
When a user modifies their HTML which is only part of the page, I generate a new static page and store it. It reduces the load on the server drastically. I even have some calendars - instead of generating them each time they are called I generate a static one as an HTML fragment and include it in pseudo-static pages using HTML::Template. At midnight UTC each day I generate about 120 new static pages for the following day, it takes less than 10 seconds to do! The slowest part of the whole operation is replacing the actual files.
|
|---|