Say you have a site that queries a database and dynamically generates 1000
pages all linked appropriately. Assume the information in the database is
relatively stable, changing on a weekly basis. I see at least two ways to
accomplish this:
1. Make all the pages php and query and create pages on the fly as needed
by the users.
2. Setup a cron task to call a php script and generate all the html pages
once a day during some low usage period.
Obviously, method 2 much more efficient than running MySQL queries for
each user. That said, I don't see many people doing this. I do realize
that PHP caches are designed to reduce the inefficiencies but why even mess
with them when you can create the entire site in html, via php?
pages all linked appropriately. Assume the information in the database is
relatively stable, changing on a weekly basis. I see at least two ways to
accomplish this:
1. Make all the pages php and query and create pages on the fly as needed
by the users.
2. Setup a cron task to call a php script and generate all the html pages
once a day during some low usage period.
Obviously, method 2 much more efficient than running MySQL queries for
each user. That said, I don't see many people doing this. I do realize
that PHP caches are designed to reduce the inefficiencies but why even mess
with them when you can create the entire site in html, via php?
Comment