Most of highly trafficked and highly commented wordpress blogs rely upon some smart caching solution or another.�قƂ�ǂ̐l�g�����Ɣ��ɍ��x�Ɉˑ����邢���‚��̃u���O�ɃR�����gWordPress�̃X�}�[�g�L���b�V���܂��͕ʂ̉�����ł��B However it may not be enough to prevent slowing down your server if your post(s) are heavily commented upon.�����������h�����߂ɏ\���Ȃ��Ƃ��ł��Ȃ��ꍇ�͌������Ă���T�[�o�[�̓��e�i�b�j�́A���Ȃ�̃R�����g�ɂ��܂��B This is because smart caching solutions re-create the cache whenever a new comment is posted.����́A�X�}�[�g�L���b�V���̃\�����[�V�������č쐬����Ƃ��ɂ́A�L���b�V���ɐV�����R�����g���f�ڂ���܂��B Here is a simple solution in three steps.���Ɏ����̂́A�ȒP�ȉ������3�‚̎菇�����s���܂��B

Steps:�X�e�b�v�F

  1. Install (and activate)�C���X�g�[���i���A�A�N�e�B�u���j Wp-Cache 2 WP�B���ꏊ2 plugin.�������ł��B I have excellent experience with it for over a year.���͑f���炵���o��������1�N�ȏ�ł��B
  2. Modify wp-cache-phase2.php (one of the plugin files) to comment / delete the line:�ύX��WP -�L���b�V��- phase2.php �i�������̂����ꂩ�̃t�@�C���j���R�����g/�폜���čs�F
    add_action('comment_post', 'wp_cache_get_postid_from_comment', 0); add_action �i ' comment_post ' �A ' wp_cache_get_postid_from_comment ' �A 0 �j ;
  3. Set the cache expiration time to 2 hours or more.�L���b�V���̗L������ݒ肷�鎞�Ԃ�2���Ԉȏ�ł��B This can easily handle a slashdot effect without breaking a sweat.����́A�X���b�V���h�b�g�̌�ʂ�e�Ղɏ�������j�������ƂȂ����������B

The change in step 2 ensures that the pages are not regenerated everytime a new comment is posted.���̕ύX�ɂ��A�X�e�b�v2�ōĐ�����Ȃ���everytime�̃y�[�W�ɐV�����R�����g���f�ڂ���܂��B They are however regenerated after the expiration of cache.�������ނ�̓L���b�V���̗L���Ԃ�����������ɍĐ������܂��B This time lag saves an enormous amount of sql query when a post is heavily commented.���̎��Ԃ̂���Z�[�u�͖c��Ȑ���SQL�N�G�������s����Ƃ��ɂ͂��Ȃ�̃R�����g�𓊍e���܂��B