Rebuilding the cache for specific pages
-
In my WP site I am importing automatically posts from some feeds. After I finish such an import, some posts might be deleted, and others added. I do not want to clear the entire cache, as rebuilding it for a few thousands posts would take time and resources, but I want to target specific pages and rebuild their cached version, as follows:
- all the new custom posts
- all the deleted custom posts
- the archive of the specific CPT that contains the imported posts (first page, and then each page after that)
- the archives of the related taxonomies (first page, and then each page after that)
For #1, I think I found the solution in an answer, could you confirm this would be the right approach in my case too? https://www.ads-software.com/support/topic/flush-cache-on-specific-pages/#post-17483836
For #2, do I need to do anything extra after deleting the posts with wp_delete_post()?
For #3 and #4, what would be the best method to use?
- The topic ‘Rebuilding the cache for specific pages’ is closed to new replies.