[Plugin: WP Super Cache] wp_delete_post() & wp_insert_post() Delete Entire Cache
-
I am developing a new website that currently has about 2500 pages with a custom post type. A few obsolete pages with that post type are automatically deleted and a few new ones are automatically created every ten minutes by a PHP CLI script that I wrote. Obsolete pages are deleted by calling wp_delete_post($postid, true). New pages are created by calling wp_insert_post($my_post). Calling either of those functions deletes all existing supercache static files, but deleting or creating pages within the WP admin system does not.
Is there another way I can delete and create posts from my script that will prevent WP Super Cache from deleting the entire cache? If not, could my script set your DONOTDELETECACHE flag to avoid the problem? Is there another way if that isn’t going to work?
- The topic ‘[Plugin: WP Super Cache] wp_delete_post() & wp_insert_post() Delete Entire Cache’ is closed to new replies.