Anspress 4: Clearing WP Home Page Caching without Reason

Solved5.76K viewsIssues
0

I had a strange problem latetly. My cached Home page was cleared many times during the day, without any reason.

Adding some code in Comet Cache clearing routines, i see Anspress doing that. I have NO idea what the following means, but PLEASE Rahul comment and help here:

 

1) [internal function]: shutdown_action_hook()
2) /home/wp-includes/load.php(677): do_action(‘shutdown’)
3) /home/wp-includes/plugin.php(453): WP_Hook->do_action(Array)
4) /home/wp-includes/class-wp-hook.php(323): WP_Hook->apply_filters(NULL, Array)
5) /home/wp-includes/class-wp-hook.php(298): AnsPress_Views::insert_views(”)
6) /home/wp-content/plugins/anspress-question-answer/includes/views.php(48): ap_update_views_count(28413)
7) /home/wp-content/plugins/anspress-question-answer/includes/qameta.php(282): ap_insert_qameta(28413, Array)
8) /home/wp-content/plugins/anspress-question-answer/includes/qameta.php(114): clean_post_cache(Object(WP_Post))
9) /home/wp-includes/post.php(5714): do_action(‘clean_post_cach…’, 28413, Object(WP_Post))
10) /home/wp-includes/plugin.php(453): WP_Hook->do_action(Array)
11) /home/wp-includes/class-wp-hook.php(323): WP_Hook->apply_filters(”, Array)
12) /home/wp-includes/class-wp-hook.php(300): WebSharks\CometCache\Classes\Plugin->autoClearPostCache(28413)
13) /home/wp-content/plugins/comet-cache/src/includes/traits/Plugin/WcpPostUtils.php(100): WebSharks\CometCache\Classes\Plugin->autoClearHomePageCache()

selected answer

This happens everytime a VIEW of a Question happens.

Also happens with WP Super Cache. So it is not Comet Cache specific.

Thanks for reporting. I found the culprit. It was happening because I am flushing object cache on qameta update.

0

Hello Cagliostro,

Please try my latest fix and lemme know.

selected as best answer

Seems fixed, many thanks !

0

Posting a NEW Question, clears the Home page:

1) /home/wp-admin/admin-ajax.php(91): do_action(‘wp_ajax_ap_ajax’)
2) /home/wp-includes/plugin.php(453): WP_Hook->do_action(Array)
3) /home/wp-includes/class-wp-hook.php(323): WP_Hook->apply_filters(”, Array)
4) /home/wp-includes/class-wp-hook.php(298): AnsPress_Process_Form->ap_ajax(”)
5) /home/wp-content/plugins/anspress-question-answer/includes/process-form.php(66): AnsPress_Process_Form->process_form()
6) /home/wp-content/plugins/anspress-question-answer/includes/process-form.php(93): AnsPress_Process_Form->process_ask_form()
7) /home/wp-content/plugins/anspress-question-answer/includes/process-form.php(197): ap_save_question(Array, true)
8) /home/wp-content/plugins/anspress-question-answer/includes/ask-form.php(275): wp_insert_post(Array, true)
9) /home/wp-includes/post.php(3402): clean_post_cache(Object(WP_Post))
10) /home/wp-includes/post.php(5714): do_action(‘clean_post_cach…’, 28425, Object(WP_Post))
11) /home/wp-includes/plugin.php(453): WP_Hook->do_action(Array)
12) /home/wp-includes/class-wp-hook.php(323): WP_Hook->apply_filters(”, Array)
13) /home/wp-includes/class-wp-hook.php(300): WebSharks\CometCache\Classes\Plugin->autoClearPostCache(28425)
14) /home/wp-content/plugins/comet-cache/src/includes/traits/Plugin/WcpPostUtils.php(100): WebSharks\CometCache\Classes\Plugin->autoClearHomePageCache()

—————————-

commented on answer

Hello,
That is not a bug, its done by all cache plugin.

0

Rahul,

I see this also:

 

1) /home/wp-admin/admin-ajax.php(91): do_action(‘wp_ajax_ap_imag…’)
2) /home/wp-includes/plugin.php(453): WP_Hook->do_action(Array)
3) /home/wp-includes/class-wp-hook.php(323): WP_Hook->apply_filters(”, Array)
4) /home/wp-includes/class-wp-hook.php(298): AnsPress_Uploader::image_submission(”)
5) /home/wp-content/plugins/anspress-question-answer/includes/upload.php(39): ap_upload_user_file(Array, true, NULL)
6) /home/wp-content/plugins/anspress-question-answer/includes/upload.php(182): wp_insert_attachment(Array, ‘/home/valuema/t…’)
7) /home/wp-includes/post.php(4836): wp_insert_post(Array, false)
8) /home/wp-includes/post.php(3402): clean_post_cache(Object(WP_Post))
9) /home/wp-includes/post.php(5714): do_action(‘clean_post_cach…’, 28420, Object(WP_Post))
10) /home/wp-includes/plugin.php(453): WP_Hook->do_action(Array)
11) /home/wp-includes/class-wp-hook.php(323): WP_Hook->apply_filters(”, Array)
12) /home/wp-includes/class-wp-hook.php(300): WebSharks\CometCache\Classes\Plugin->autoClearPostCache(28420)
13) /home/wp-content/plugins/comet-cache/src/includes/traits/Plugin/WcpPostUtils.php(100): WebSharks\CometCache\Classes\Plugin->autoClearHomePageCache()

—————————-

1) /home/wp-admin/admin-ajax.php(91): do_action(‘wp_ajax_ap_ajax’)
2) /home/wp-includes/plugin.php(453): WP_Hook->do_action(Array)
3) /home/wp-includes/class-wp-hook.php(323): WP_Hook->apply_filters(”, Array)
4) /home/wp-includes/class-wp-hook.php(298): AnsPress_Process_Form->ap_ajax(”)
5) /home/wp-content/plugins/anspress-question-answer/includes/process-form.php(66): AnsPress_Process_Form->process_form()
6) /home/wp-content/plugins/anspress-question-answer/includes/process-form.php(93): AnsPress_Process_Form->process_ask_form()
7) /home/wp-content/plugins/anspress-question-answer/includes/process-form.php(197): ap_save_question(Array, true)
8) /home/wp-content/plugins/anspress-question-answer/includes/ask-form.php(275): wp_insert_post(Array, true)
9) /home/wp-includes/post.php(3402): clean_post_cache(Object(WP_Post))
10) /home/wp-includes/post.php(5714): do_action(‘clean_post_cach…’, 28421, Object(WP_Post))
11) /home/wp-includes/plugin.php(453): WP_Hook->do_action(Array)
12) /home/wp-includes/class-wp-hook.php(323): WP_Hook->apply_filters(”, Array)
13) /home/wp-includes/class-wp-hook.php(300): WebSharks\CometCache\Classes\Plugin->autoClearPostCache(28421)
14) /home/wp-content/plugins/comet-cache/src/includes/traits/Plugin/WcpPostUtils.php(100): WebSharks\CometCache\Classes\Plugin->autoClearHomePageCache()

—————————-

1) /home/wp-admin/admin-ajax.php(91): do_action(‘wp_ajax_ap_ajax’)
2) /home/wp-includes/plugin.php(453): WP_Hook->do_action(Array)
3) /home/wp-includes/class-wp-hook.php(323): WP_Hook->apply_filters(”, Array)
4) /home/wp-includes/class-wp-hook.php(298): AnsPress_Process_Form->ap_ajax(”)
5) /home/wp-content/plugins/anspress-question-answer/includes/process-form.php(76): do_action(‘ap_ajax_new_com…’)
6) /home/wp-includes/plugin.php(453): WP_Hook->do_action(Array)
7) /home/wp-includes/class-wp-hook.php(323): WP_Hook->apply_filters(”, Array)
8) /home/wp-includes/class-wp-hook.php(298): AnsPress_Comment_Hooks::new_comment(”)
9) /home/wp-content/plugins/anspress-question-answer/includes/comments.php(128): wp_new_comment(Array, true)
10) /home/wp-includes/comment.php(1948): wp_insert_comment(Array)
11) /home/wp-includes/comment.php(1737): wp_update_comment_count(28421)
12) /home/wp-includes/comment.php(2290): wp_update_comment_count_now(28421)
13) /home/wp-includes/comment.php(2338): clean_post_cache(Object(WP_Post))
14) /home/wp-includes/post.php(5714): do_action(‘clean_post_cach…’, 28421, Object(WP_Post))
15) /home/wp-includes/plugin.php(453): WP_Hook->do_action(Array)
16) /home/wp-includes/class-wp-hook.php(323): WP_Hook->apply_filters(”, Array)
17) /home/wp-includes/class-wp-hook.php(300): WebSharks\CometCache\Classes\Plugin->autoClearPostCache(28421)
18) /home/wp-content/plugins/comet-cache/src/includes/traits/Plugin/WcpPostUtils.php(100): WebSharks\CometCache\Classes\Plugin->autoClearHomePageCache()

—————————-

1) /home/wp-admin/admin-ajax.php(91): do_action(‘wp_ajax_ap_imag…’)
2) /home/wp-includes/plugin.php(453): WP_Hook->do_action(Array)
3) /home/wp-includes/class-wp-hook.php(323): WP_Hook->apply_filters(”, Array)
4) /home/wp-includes/class-wp-hook.php(298): AnsPress_Uploader::image_submission(”)
5) /home/wp-content/plugins/anspress-question-answer/includes/upload.php(39): ap_upload_user_file(Array, true, NULL)
6) /home/wp-content/plugins/anspress-question-answer/includes/upload.php(182): wp_insert_attachment(Array, ‘/home/valuema/t…’)
7) /home/wp-includes/post.php(4836): wp_insert_post(Array, false)
8) /home/wp-includes/post.php(3402): clean_post_cache(Object(WP_Post))
9) /home/wp-includes/post.php(5714): do_action(‘clean_post_cach…’, 28422, Object(WP_Post))
10) /home/wp-includes/plugin.php(453): WP_Hook->do_action(Array)
11) /home/wp-includes/class-wp-hook.php(323): WP_Hook->apply_filters(”, Array)
12) /home/wp-includes/class-wp-hook.php(300): WebSharks\CometCache\Classes\Plugin->autoClearPostCache(28422)
13) /home/wp-content/plugins/comet-cache/src/includes/traits/Plugin/WcpPostUtils.php(100): WebSharks\CometCache\Classes\Plugin->autoClearHomePageCache()

—————————-

1) /home/wp-admin/admin-ajax.php(91): do_action(‘wp_ajax_ap_ajax’)
2) /home/wp-includes/plugin.php(453): WP_Hook->do_action(Array)
3) /home/wp-includes/class-wp-hook.php(323): WP_Hook->apply_filters(”, Array)
4) /home/wp-includes/class-wp-hook.php(298): AnsPress_Process_Form->ap_ajax(”)
5) /home/wp-content/plugins/anspress-question-answer/includes/process-form.php(66): AnsPress_Process_Form->process_form()
6) /home/wp-content/plugins/anspress-question-answer/includes/process-form.php(97): AnsPress_Process_Form->process_answer_form()
7) /home/wp-content/plugins/anspress-question-answer/includes/process-form.php(362): ap_save_answer(28421, Array)
8) /home/wp-content/plugins/anspress-question-answer/includes/answer-form.php(209): wp_insert_post(Array, true)
9) /home/wp-includes/post.php(3402): clean_post_cache(Object(WP_Post))
10) /home/wp-includes/post.php(5714): do_action(‘clean_post_cach…’, 28423, Object(WP_Post))
11) /home/wp-includes/plugin.php(453): WP_Hook->do_action(Array)
12) /home/wp-includes/class-wp-hook.php(323): WP_Hook->apply_filters(”, Array)
13) /home/wp-includes/class-wp-hook.php(300): WebSharks\CometCache\Classes\Plugin->autoClearPostCache(28423)
14) /home/wp-content/plugins/comet-cache/src/includes/traits/Plugin/WcpPostUtils.php(100): WebSharks\CometCache\Classes\Plugin->autoClearHomePageCache()

—————————-

1) /home/wp-admin/admin-ajax.php(91): do_action(‘wp_ajax_ap_ajax’)
2) /home/wp-includes/plugin.php(453): WP_Hook->do_action(Array)
3) /home/wp-includes/class-wp-hook.php(323): WP_Hook->apply_filters(”, Array)
4) /home/wp-includes/class-wp-hook.php(298): AnsPress_Process_Form->ap_ajax(”)
5) /home/wp-content/plugins/anspress-question-answer/includes/process-form.php(76): do_action(‘ap_ajax_delete_…’)
6) /home/wp-includes/plugin.php(453): WP_Hook->do_action(Array)
7) /home/wp-includes/class-wp-hook.php(323): WP_Hook->apply_filters(”, Array)
8) /home/wp-includes/class-wp-hook.php(298): AnsPress_Uploader::delete_attachment(”)
9) /home/wp-content/plugins/anspress-question-answer/includes/upload.php(75): wp_delete_attachment(‘28420’, true)
10) /home/wp-includes/post.php(4909): do_action(‘delete_post’, ‘28420’)
11) /home/wp-includes/plugin.php(453): WP_Hook->do_action(Array)
12) /home/wp-includes/class-wp-hook.php(323): WP_Hook->apply_filters(NULL, Array)
13) /home/wp-includes/class-wp-hook.php(298): WebSharks\CometCache\Classes\Plugin->autoClearPostCache(28420)
14) /home/wp-content/plugins/comet-cache/src/includes/traits/Plugin/WcpPostUtils.php(100): WebSharks\CometCache\Classes\Plugin->autoClearHomePageCache()

—————————-

1) /home/wp-admin/admin-ajax.php(91): do_action(‘wp_ajax_ap_ajax’)
2) /home/wp-includes/plugin.php(453): WP_Hook->do_action(Array)
3) /home/wp-includes/class-wp-hook.php(323): WP_Hook->apply_filters(”, Array)
4) /home/wp-includes/class-wp-hook.php(298): AnsPress_Process_Form->ap_ajax(”)
5) /home/wp-content/plugins/anspress-question-answer/includes/process-form.php(66): AnsPress_Process_Form->process_form()
6) /home/wp-content/plugins/anspress-question-answer/includes/process-form.php(93): AnsPress_Process_Form->process_ask_form()
7) /home/wp-content/plugins/anspress-question-answer/includes/process-form.php(152): AnsPress_Process_Form->edit_question()
8) /home/wp-content/plugins/anspress-question-answer/includes/process-form.php(257): ap_save_question(Array)
9) /home/wp-content/plugins/anspress-question-answer/includes/ask-form.php(275): wp_insert_post(Array, true)
10) /home/wp-includes/post.php(3402): clean_post_cache(Object(WP_Post))
11) /home/wp-includes/post.php(5714): do_action(‘clean_post_cach…’, 28421, Object(WP_Post))
12) /home/wp-includes/plugin.php(453): WP_Hook->do_action(Array)
13) /home/wp-includes/class-wp-hook.php(323): WP_Hook->apply_filters(”, Array)
14) /home/wp-includes/class-wp-hook.php(300): WebSharks\CometCache\Classes\Plugin->autoClearPostCache(28421)
15) /home/wp-content/plugins/comet-cache/src/includes/traits/Plugin/WcpPostUtils.php(100): WebSharks\CometCache\Classes\Plugin->autoClearHomePageCache()

—————————-

1) /home/wp-admin/admin-ajax.php(91): do_action(‘wp_ajax_ap_ajax’)
2) /home/wp-includes/plugin.php(453): WP_Hook->do_action(Array)
3) /home/wp-includes/class-wp-hook.php(323): WP_Hook->apply_filters(”, Array)
4) /home/wp-includes/class-wp-hook.php(298): AnsPress_Process_Form->ap_ajax(”)
5) /home/wp-content/plugins/anspress-question-answer/includes/process-form.php(76): do_action(‘ap_ajax_delete_…’)
6) /home/wp-includes/plugin.php(453): WP_Hook->do_action(Array)
7) /home/wp-includes/class-wp-hook.php(323): WP_Hook->apply_filters(”, Array)
8) /home/wp-includes/class-wp-hook.php(298): AnsPress_Uploader::delete_attachment(”)
9) /home/wp-content/plugins/anspress-question-answer/includes/upload.php(75): wp_delete_attachment(‘28422’, true)
10) /home/wp-includes/post.php(4909): do_action(‘delete_post’, ‘28422’)
11) /home/wp-includes/plugin.php(453): WP_Hook->do_action(Array)
12) /home/wp-includes/class-wp-hook.php(323): WP_Hook->apply_filters(NULL, Array)
13) /home/wp-includes/class-wp-hook.php(298): WebSharks\CometCache\Classes\Plugin->autoClearPostCache(28422)
14) /home/wp-content/plugins/comet-cache/src/includes/traits/Plugin/WcpPostUtils.php(100): WebSharks\CometCache\Classes\Plugin->autoClearHomePageCache()

—————————-

1) /home/wp-admin/admin-ajax.php(91): do_action(‘wp_ajax_ap_ajax’)
2) /home/wp-includes/plugin.php(453): WP_Hook->do_action(Array)
3) /home/wp-includes/class-wp-hook.php(323): WP_Hook->apply_filters(”, Array)
4) /home/wp-includes/class-wp-hook.php(298): AnsPress_Process_Form->ap_ajax(”)
5) /home/wp-content/plugins/anspress-question-answer/includes/process-form.php(66): AnsPress_Process_Form->process_form()
6) /home/wp-content/plugins/anspress-question-answer/includes/process-form.php(97): AnsPress_Process_Form->process_answer_form()
7) /home/wp-content/plugins/anspress-question-answer/includes/process-form.php(322): AnsPress_Process_Form->edit_answer(Object(WP_Post))
8) /home/wp-content/plugins/anspress-question-answer/includes/process-form.php(409): ap_save_answer(28421, Array)
9) /home/wp-content/plugins/anspress-question-answer/includes/answer-form.php(209): wp_insert_post(Array, true)
10) /home/wp-includes/post.php(3402): clean_post_cache(Object(WP_Post))
11) /home/wp-includes/post.php(5714): do_action(‘clean_post_cach…’, 28423, Object(WP_Post))
12) /home/wp-includes/plugin.php(453): WP_Hook->do_action(Array)
13) /home/wp-includes/class-wp-hook.php(323): WP_Hook->apply_filters(”, Array)
14) /home/wp-includes/class-wp-hook.php(300): WebSharks\CometCache\Classes\Plugin->autoClearPostCache(28423)
15) /home/wp-content/plugins/comet-cache/src/includes/traits/Plugin/WcpPostUtils.php(100): WebSharks\CometCache\Classes\Plugin->autoClearHomePageCache()

—————————-

1) /home/wp-admin/admin-ajax.php(91): do_action(‘wp_ajax_ap_ajax’)
2) /home/wp-includes/plugin.php(453): WP_Hook->do_action(Array)
3) /home/wp-includes/class-wp-hook.php(323): WP_Hook->apply_filters(”, Array)
4) /home/wp-includes/class-wp-hook.php(298): AnsPress_Process_Form->ap_ajax(”)
5) /home/wp-content/plugins/anspress-question-answer/includes/process-form.php(76): do_action(‘ap_ajax_action_…’)
6) /home/wp-includes/plugin.php(453): WP_Hook->do_action(Array)
7) /home/wp-includes/class-wp-hook.php(323): WP_Hook->apply_filters(”, Array)
8) /home/wp-includes/class-wp-hook.php(298): AnsPress_Ajax::permanent_delete_post(”)
9) /home/wp-content/plugins/anspress-question-answer/includes/ajax-hooks.php(268): wp_delete_post(28421, true)
10) /home/wp-includes/post.php(2460): do_action(‘before_delete_p…’, 28421)
11) /home/wp-includes/plugin.php(453): WP_Hook->do_action(Array)
12) /home/wp-includes/class-wp-hook.php(323): WP_Hook->apply_filters(NULL, Array)
13) /home/wp-includes/class-wp-hook.php(298): AnsPress_Hooks::before_delete(28421)
14) /home/wp-content/plugins/anspress-question-answer/includes/hooks.php(178): wp_delete_post(28423, true)
15) /home/wp-includes/post.php(2508): do_action(‘delete_post’, 28423)
16) /home/wp-includes/plugin.php(453): WP_Hook->do_action(Array)
17) /home/wp-includes/class-wp-hook.php(323): WP_Hook->apply_filters(NULL, Array)
18) /home/wp-includes/class-wp-hook.php(298): WebSharks\CometCache\Classes\Plugin->autoClearPostCache(28423)
19) /home/wp-content/plugins/comet-cache/src/includes/traits/Plugin/WcpPostUtils.php(100): WebSharks\CometCache\Classes\Plugin->autoClearHomePageCache()

—————————-

edited answer