[wp-trac] [WordPress Trac] #54511: Remove cache time limitation in WP_Term_Query
WordPress Trac
noreply at wordpress.org
Thu Nov 25 16:00:35 UTC 2021
#54511: Remove cache time limitation in WP_Term_Query
--------------------------+------------------------------
Reporter: spacedmonkey | Owner: (none)
Type: enhancement | Status: new
Priority: normal | Milestone: Awaiting Review
Component: Taxonomy | Version: 4.6
Severity: normal | Resolution:
Keywords: | Focuses: performance
--------------------------+------------------------------
Description changed by spacedmonkey:
Old description:
> Currently there is a limitation, that term caches will only last one day.
> See the following snippet.
>
> {{{#!php
> wp_cache_add( $cache_key, $terms, 'terms', DAY_IN_SECONDS );
> }}}
>
> If we can ensure that cache invalidation is happening correctly, this
> limitation can be removed.
New description:
Currently there is a limitation, that term caches found in `WP_Term_Query`
will only last one day. See the following snippet.
{{{#!php
wp_cache_add( $cache_key, $terms, 'terms', DAY_IN_SECONDS );
}}}
If we can ensure that cache invalidation is happening correctly, this
limitation can be removed. Once this limitation is removed, cache will
live until their are correctly invalidation.
--
--
Ticket URL: <https://core.trac.wordpress.org/ticket/54511#comment:1>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list