0

I'm currently using APC cache module on my PHP installation . The problem is that whenever I publish a new post , Users must use Ctrl + f5 to see new posts . Is there any way to purge APC cache automatically after a new post is published on Wordpress ?

sajjad hosseini
  • 41
  • 1
  • 1
  • 2

1 Answers1

0

WP has a plugin to work with APC, but it hasn't been updated in a long time, AFAIK. We use WP Super Cache instead, mostly because it only requires rewrite rules and gives us more flexibility to tell what's gonna be cached and what's not. Have you tried it?

Edit for @sajjad hosseini: Since you want to stick with APC, you could hack WP creating a plugin, or in a dirty way, call apc_clear_cache() and apc_clear_cache('user') inside the wp_insert_post() function defined at wp-includes/post.php. The problem is that you probably are going to have problems when updating your WP installation, since it'll perhaps overwrite the post.php file...

Stefano Martins
  • 1,221
  • 8
  • 10