Most of highly trafficked and highly commented wordpress blogs rely upon some smart caching solution or another. La maggior parte di altamente trafficate e molto commentato WordPress Blogs contare su qualche soluzione intelligente di caching o di un altro. However it may not be enough to prevent slowing down your server if your post(s) are heavily commented upon. Tuttavia può non essere sufficiente a prevenire rallentare il server, se il tuo post (s) sono fortemente commentati. This is because smart caching solutions re-create the cache whenever a new comment is posted. Questo perché il caching delle soluzioni intelligenti ricreare la cache ogni volta che un nuovo commento è distaccato. Here is a simple solution in three steps. Qui è una soluzione semplice in tre fasi.

Steps: Procedura:

  1. Install (and activate) Installare (e attivare) Wp-Cache 2 Wp-Cache 2 plugin. I have excellent experience with it for over a year. Ho eccellente esperienza con esso per più di un anno.
  2. Modify wp-cache-phase2.php (one of the plugin files) to comment / delete the line: Modificare wp-cache-phase2.php (uno dei plug file) per commentare / eliminare la riga:
    add_action('comment_post', 'wp_cache_get_postid_from_comment', 0); add_action ( 'comment_post', 'wp_cache_get_postid_from_comment', 0);
  3. Set the cache expiration time to 2 hours or more. Impostare la data di scadenza della cache a 2 ore o più. This can easily handle a slashdot effect without breaking a sweat. Questo può facilmente gestire un effetto slashdot senza rompere uno sudore.

The change in step 2 ensures that the pages are not regenerated everytime a new comment is posted. La variazione del passo 2 garantisce che le pagine non sono sempre rigenerata un nuovo commento è distaccato. They are however regenerated after the expiration of cache. Essi sono tuttavia rigenerata dopo la scadenza del termine di cache. This time lag saves an enormous amount of sql query when a post is heavily commented. Questo lasso di tempo di risparmiare una quantità enorme di query SQL quando un post è fortemente commentati.