Closed seldimi closed 1 year ago
To help up a bit, tried both solutions here but non worked. https://make.wordpress.org/core/2022/04/28/taxonomy-performance-improvements-in-wordpress-6-0/
maxttl
to let those cache keys expireterm_exists()
and run a raw database query yourself
Hello Since WordPress 6.0, term_exists is using get_terms and caches functionality. Let's suppose we a foreach a loop where we need to check or create a taxonomy term on a loop. This will create 5 similar terms with name "test term". If you re-run the code, term_exists is running ok, so no more duplicates. If you delete all terms and modify for loop to 10, and run, it will create 10 instances of "test term"
That was not happening prior to 5.9 WordPress.
Any ideas on how to fix that?