• Hi,

    When using wordpress with an object cache, this plugin appears to not update the order when you refresh the page.

    While the plugin does write the update directly to the terms table with a $wpdb->update it doesn’t clear any cache that WordPress may have. So when you refresh the page the terms still appear in their old configuration.

    Your plugin just needs to call a cache clear using the function clean_term_cache().

    From line 178 in taxonomy-terms-order.php change to:

                        if (is_array($items) && count($items) > 0) {
                            foreach ($items as $item_key => $term_id) {
                                $wpdb->update($wpdb->terms, array('term_order' => ($item_key + 1)),
                                    array('term_id' => $term_id));
                            }
                            clean_term_cache($items);
                        }

    will fix the caching issue.

    Please implement this fix in the next version. Thanks

  • The topic ‘Plugin doesn’t clear object cache on update.’ is closed to new replies.