Does get_terms() use any sort of caching on its query?

In the docblock for get_terms(), it says the following on caching:

* The {@see 'get_terms'} filter will be called when the cache has the term and will
* pass the found term along with the array of $taxonomies and array of $args.

What does it mean by will be called the cache has the term ? Does this mean that when I do an apply_filter on get_terms, it will only be called if the term is in cache? And I’m not entirely sure what cache it is referring to here. I’m not too familiar with WordPress caching yet, so please forgive me if this should be obvious to me.

Solutions Collecting From Web of "Does get_terms() use any sort of caching on its query?"

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.