Jake Vanderwerf
2025-11-04 42fa8304ddb811b0f725f245130f70c0f5e86a6c
inc/managers/TaxonomyRelationships.php
@@ -19,7 +19,7 @@
    {
        global $wpdb;
        $this->table_name = $wpdb->prefix . BASE.'taxonomy_relationships';
        $this->cache = new CacheManager('term_relationship', 86400);
        $this->cache = CacheManager::for('term_relationship', WEEK_IN_SECONDS);
        // Ensure the table exists
//        $this->create_table_if_not_exists();
@@ -59,7 +59,7 @@
     */
    public function updatePostRelationships(int $post_id):void
    {
        $this->cache->invalidateGroup('term_relationships');
        $this->cache->invalidate();
        $post_type = get_post_type($post_id);
      if (in_array($post_type, [BASE.'directory', BASE.'dash'])) {
         return;
@@ -338,7 +338,7 @@
     */
    public function rebuildAllRelationships():bool
    {
        $this->cache->invalidateGroup('term_relationships');
        $this->cache->invalidate();
        global $wpdb;
        // Clear existing relationships
@@ -370,7 +370,7 @@
            ]
        );
        $this->cache->invalidateGroup('term_relationships');
        $this->cache->invalidate();
        return true;
    }
@@ -448,6 +448,6 @@
            $term_id,
            $term_id
        ));
        $this->cache->invalidateGroup('term_relationships');
        $this->cache->invalidate();
    }
}