Most of highly trafficked and highly commented wordpress blogs rely upon some smart caching solution or another. A maioria das vítimas de tráfico e altamente altamente comentou wordpress dependem de alguns blogs inteligentes caching solução ou outra. However it may not be enough to prevent slowing down your server if your post(s) are heavily commented upon. No entanto, poderá não ser suficiente para evitar a abrandar o seu servidor se o seu posto (s) estão muito comentado. This is because smart caching solutions re-create the cache whenever a new comment is posted. Isto é porque o caching soluções inteligentes re-criar o cache sempre que um novo comentário for postado. Here is a simple solution in three steps. Aqui está uma solução simples, em três etapas.

Steps: Passos:

  1. Install (and activate) Instalar (e ativar) Wp-Cache 2 WP-Cache 2 plugin. I have excellent experience with it for over a year. Tenho excelente experiência com ele durante mais de um ano.
  2. Modify wp-cache-phase2.php (one of the plugin files) to comment / delete the line: Modificar wp-cache-phase2.php (um dos arquivos do plugin) para comentar / apagar a linha:
    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. Defina o cache expirar tempo de 2 horas ou mais. This can easily handle a slashdot effect without breaking a sweat. Isso pode facilmente lidar com um efeito slashdot sem quebrar um suor.

The change in step 2 ensures that the pages are not regenerated everytime a new comment is posted. A mudança na etapa 2 garante que as páginas não são regenerados sempre um novo comentário for postado. They are however regenerated after the expiration of cache. Eles são, no entanto, regenerada após a expiração do cache. This time lag saves an enormous amount of sql query when a post is heavily commented. Este desfasamento temporal economiza uma quantidade enorme de consulta SQL quando um post é fortemente comentados.