WPCOM_VIP_Cache_Manager::queue_terms_purges PHP Method

queue_terms_purges() public method

Hooks the clean_term_cache action We do not respect requests to clear caches for the entire taxonomy, as this would be potentially hundreds or thousands of PURGE requests.
public queue_terms_purges ( array $ids, string $taxonomy )
$ids array An array of term IDs.
$taxonomy string Taxonomy slug.
    public function queue_terms_purges($ids, $taxonomy)
    {
        $get_term_args = array('taxonomy' => $taxonomy, 'include' => $ids, 'hide_empty' => false);
        $terms = get_terms($get_term_args);
        if (is_wp_error($terms)) {
            return;
        }
        $term_purge_urls = array();
        foreach ($terms as $term) {
            $term_purge_urls = array_merge($term_purge_urls, $this->get_purge_urls_for_term($term));
        }
        $this->purge_urls = array_merge($this->purge_urls, $term_purge_urls);
        $this->purge_urls = array_unique($this->purge_urls);
    }