Most of highly trafficked and highly commented wordpress blogs rely upon some smart caching solution or another. La plupart des victimes de la traite et très fortement commentés des blogs wordpress compter sur la mise en mémoire cache certaines puce ou d'une autre solution. However it may not be enough to prevent slowing down your server if your post(s) are heavily commented upon. Mai Toutefois, il ne suffira pas à empêcher ralentir votre serveur si votre poste (s) sont largement commentés. This is because smart caching solutions re-create the cache whenever a new comment is posted. La raison en est que la mise en cache des solutions intelligentes re-créer la mémoire cache chaque fois qu'un nouveau commentaire est posté. Here is a simple solution in three steps. Voici une solution simple en trois étapes.

Steps: Marche à suivre:

  1. Install (and activate) Installez (et activer) Wp-Cache 2 Wp-cache 2 plugin. I have excellent experience with it for over a year. J'ai une excellente expérience avec elle depuis plus d'un an.
  2. Modify wp-cache-phase2.php (one of the plugin files) to comment / delete the line: Modifier wp-cache-phase2.php (un des fichiers plugin) pour commenter / supprimer la ligne:
    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. Réglez la date d'expiration du cache à 2 heures ou plus. This can easily handle a slashdot effect without breaking a sweat. Cela peut facilement manipuler un effet slashdot sans casser une sueur.

The change in step 2 ensures that the pages are not regenerated everytime a new comment is posted. Le changement à l'étape 2 assure que les pages ne sont pas régénérés à chaque fois un nouveau commentaire est posté. They are however regenerated after the expiration of cache. Ils sont toutefois régénérée après l'expiration de cache. This time lag saves an enormous amount of sql query when a post is heavily commented. Ce décalage sauve une énorme quantité de requête SQL lorsqu'un poste est largement commenté.