User gmazzap has a good explanation of Object Cache you may want to read over.
If we take a look at get_terms()
we can see it creates a new WP_Term_Query() and that classes get_terms()
is where the potential caching happens. Line 666 specifically. Just a little further down we can see if it test if a cache exists.
So the caching will only last a page load to ensure that duplicate queries don’t bog down the database with multiple calls. The filters will attempt to use a cache and if it can’t find it ( unlikely ) it will create one for future use down the page load line.
Related Posts:
- What is ‘term_group’ for ‘order_by’ in get_terms()?
- Order get_terms by term meta
- Display all the subcategories from a specific category?
- Get parent id by term id
- How to get_term_children output in alphabetical order?
- When to / not to use wp_get_post_terms vs get_the_terms?
- Why does WordPress combine a term with the same name in the wp_terms table?
- Get multiple term IDs by slug, and then exclude them in get_terms
- Child terms from multiple parents?
- same taxonomy for several post types: how to hide empty in a specific post type?
- How to sort terms with diacritical signs?
- wp_set_object_terms creates relationship to REVISION?
- How do I access a single term from a post?
- Prevent Selected Terms Rising to the Top
- How to update incorrect post count in taxonomy?
- has_term() does not return when term is assigned post?
- get_terms() but with additional dimensions?
- how is it possible that using wp_insert_category throw a fatal error?
- get_terms only show term if there is a post using it
- Get the Term List – Ordering
- How to trace/fix false $term->count, rogue term relationships?
- How to order and count get_terms by specific post type?
- get_terms() order by term_meta
- Difference between get_category, get_term_by and get_categories
- get_terms() for custom taxonomy related to another taxonomy
- get_terms from registered taxonomies not working
- I want to loop through Woocommerce Product Catogories and show them in dropdown
- Do I have to set parent when set post term?
- How do I determine if a certain term is in an array?
- Display custom taxonomy on single post
- Group child category IDs based on their parent category
- Clone Terms of one taxonomy to another
- Custom Template for one Taxonomy Term
- Unset actions for terms parent only
- Get random out from get_terms()
- Conditional based on number of specific custom taxonomy terms in archive.php
- Categories order with get_terms_args not working in 4.7
- Getting all categories even with no products under it?
- Sticky posts per category
- Faceted search with WP-API data
- Show List of Terms (not posts) that have been Recently Updated?
- Programmatically add posts add and assign postmeta and assign terms
- When using the get_terms and trying to order the terms using the ‘order’ and/or ‘orderby’ does not work
- Some custom taxonomy child terms not showing in admin. Caching problem?
- get_terms – name__like a number
- Query to get term id using post id?
- Conditional Statement with Multiple Terms?
- wp_set_post_terms is assigning only the last of several terms to a post
- Add class to first post queried
- Get all terms linked to a post and include those who not connected from get_terms and sort
- How to force acceptance of site terms on first login?
- Add HTML to Term Description
- Get terms within a custom taxonomy
- array_replace throwing php_warning but working anyway
- Get current term in single.php
- How to get terms of not only the current cat but also of all its children
- Ordering taxonomy output in this function
- How to get the $meta_type given the $object_id
- Tax query with multiple terms in pre_get_posts
- Echo term slug op post on archive page
- Display posts belonging to child term
- Getting terms to have space between them
- Get get_terms alphabetically
- How to get term by name with parent id?
- Custom term templates
- INSERTING Data into table with placeholders
- List posts by their custom taxonomy term, with a condition
- Set unique term_id from custom meta keys
- Trying to use wp_set_object_terms while supplying an array for both term id, and texonomies
- Taxonomy Drop Down with hierarchical view using $terms
- Create Terms on taxonomy by text field
- Customizing the wordpress tag-cloud output
- PHP Warning: Attempt to read property “slug” on bool in tax query
- get_terms() delivers wrong count with custom taxonomy childs on custom post type
- get_the_term_list( get_the_ID() label formatting?
- I can get posts in all categories. But I want to get the custom post type I created
- wp_set_object_terms() to update a post taxonomy value
- Order get_terms by multiple values
- Get All Taxonomy Terms From Get_terms Array With Specific Array Key
- Confused by get_the_terms to use in a new wp_query
- get_terms for all custom taxonomies shows invalid taxonomy error
- Change the last separator in the_terms
- Importing custom DB table entries as posts with Categories
- A Comma Between Each Items Except the Last One with get_the_term_list [duplicate]
- list of tags overlay
- Getting Term_id – Taxonomy Metadata plugin
- store an array of all the terms existing
- Get only last child category link of products
- Get Parent Custom Taxonomy Term and Color Div background
- get_the_term_list() display in ul li and remove tag
- Function to delete a term when a custom post with the same slug is trashed
- Custom field drop down to set the term of the post when published
- Conditional output based on taxonomy ID of custom post
- How we retrieve the ‘tags’ and ‘attachment’ of the custom post which is created by wp_insert_post();
- list taxonomy terms in current post / current category
- Relate term to term?
- How can I filter get_terms with post meta
- How to get tags only with custom meta field and display them randomly?
- Unable to import term_meta in wordpress using wp_cron
- Woo – Change order status by category [closed]