[wp-trac] [WordPress Trac] #49692: _prime_post_caches should not do anything if object cache is not running
WordPress Trac
noreply at wordpress.org
Wed Apr 9 15:43:30 UTC 2025
#49692: _prime_post_caches should not do anything if object cache is not running
--------------------------+--------------------------
Reporter: pcfreak30 | Owner: (none)
Type: defect (bug) | Status: closed
Priority: normal | Milestone:
Component: Cache API | Version: 5.4
Severity: normal | Resolution: maybelater
Keywords: | Focuses: performance
--------------------------+--------------------------
Changes (by swissspidy):
* status: new => closed
* resolution: => maybelater
* milestone: Awaiting Review =>
Old description:
> From what I can see
>
> {{{
> _prime_post_caches
> }}}
>
> does more harm than good when querying a large set of posts, and using
> the memory object cache.
>
> There should be a check with
> {{{
> wp_using_ext_object_cache
> }}}
> and possibly a filter to override the behavior so this only takes action
> when object cache is in use.
New description:
From what I can see
{{{
_prime_post_caches
}}}
does more harm than good when querying a large set of posts, and using the
memory object cache.
There should be a check with
{{{
wp_using_ext_object_cache
}}}
and possibly a filter to override the behavior so this only takes action
when object cache is in use.
--
Comment:
Filters could probably be added, but this would require some testing first
to get some real numbers on impact for specific use cases. Closing due to
lack of traction for now.
--
Ticket URL: <https://core.trac.wordpress.org/ticket/49692#comment:3>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list