[wp-trac] [WordPress Trac] #36905: Add caching to get_page_by_title
WordPress Trac
noreply at wordpress.org
Sun Dec 16 10:23:53 UTC 2018
#36905: Add caching to get_page_by_title
-------------------------------------------------+-------------------------
Reporter: spacedmonkey | Owner: igmoweb
Type: enhancement | Status: assigned
Priority: normal | Milestone: Future
| Release
Component: Posts, Post Types | Version: 2.1
Severity: normal | Resolution:
Keywords: has-patch good-first-bug has-unit- | Focuses:
tests | performance
-------------------------------------------------+-------------------------
Comment (by spacedmonkey):
@pcfreak30 Sadly, you are incorrect, with the `cache_results` flag set,
all that does is prime post caches and the query it's self is not cached.
See
[https://github.com/WordPress/WordPress/blob/3d448538caf519c6355bb32c0c8c21da87692855
/wp-includes/class-wp-query.php#L2992-L2993 this] and the related ticket
#22176 .
However, I do agree, we should be using `WP_Query`, as it is clearer that
way. I will update the patch to fix the caching in with the query call
changes.
--
Ticket URL: <https://core.trac.wordpress.org/ticket/36905#comment:12>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list