[wp-hackers] Saving the entire HTML sent to client
Dion Hulse (dd32)
wordpress at dd32.id.au
Thu Dec 8 01:56:59 UTC 2011
On 8 December 2011 12:52, IC IC <icwordpress at gmail.com> wrote:
> To minimize the DB queries down to nothing on the home page of your
> magazine styled web site, what do you say about the following idea?
>
> Every time, you create a post or page (or cat or tag for that matter
> ), at the time committing that change into the database, have a plug
> in run the home page internally ( as if a visitor visited your home
> page ) and grab the html generated and create a text file out of that
> HTML ( from all the way up DOCTYPE down </html). This way, your home
> page ( be it home.php or front-page.php or whatever), may check if the
> current user logged in and if not, just do a PHP include of that
> recently generated file?
>
> Does PHP provide a way to get a hold of that entire HTML? Would that
> be a wp_footer hook?
That sounds like you want a Static cached page which only updates when
you add posts?
If so.. Pretty much every Caching plugin out there does this, Have a
look into Wp Super cache and Wp Total Cache for a start.
You can take it further and using those plugins, combined with a
.htaccess rule, have the web server serve the static cache file
directly - avoiding the PHP overhead all together
More information about the wp-hackers
mailing list