Most of highly trafficked and highly commented wordpress blogs rely upon some smart caching solution or another. La mayoría de las víctimas de la trata y muy muy comentado wordpress blogs se basan en algunas de caché inteligente solución u otra. However it may not be enough to prevent slowing down your server if your post(s) are heavily commented upon. Sin embargo, puede no ser suficiente para evitar ralentizar su servidor si su puesto (s) están muy comentado. This is because smart caching solutions re-create the cache whenever a new comment is posted. Esto se debe a que las soluciones inteligentes de almacenamiento en caché volver a crear la caché cada vez que un nuevo comentario es publicado. Here is a simple solution in three steps. Aquí hay una solución simple en tres pasos.

Steps: Pasos:

  1. Install (and activate) Instalación (y activar) Wp-Cache 2 Wp-Cache 2 plugin. I have excellent experience with it for over a year. Tengo una excelente experiencia con ella hace más de un año.
  2. Modify wp-cache-phase2.php (one of the plugin files) to comment / delete the line: Modificar wp-cache-phase2.php (uno de los archivos plugin) para comentar o suprimir la línea:
    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. Establezca el tiempo de expiración de caché a 2 horas o más. This can easily handle a slashdot effect without breaking a sweat. Esto puede fácilmente manejar un efecto slashdot sin romper a sudar.

The change in step 2 ensures that the pages are not regenerated everytime a new comment is posted. El cambio en el paso 2 garantiza que las páginas no son regenerados cada vez que un nuevo comentario es publicado. They are however regenerated after the expiration of cache. No obstante, se regeneran después de la expiración de caché. This time lag saves an enormous amount of sql query when a post is heavily commented. Este lapso de tiempo ahorra una cantidad enorme de consulta SQL cuando un puesto es muy comentado.