[wp-trac] [WordPress Trac] #49692: _prime_post_caches should not do anything if object cache is not running

WordPress Trac noreply at wordpress.org
Tue Mar 24 18:43:51 UTC 2020


#49692: _prime_post_caches should not do anything if object cache is not running
--------------------------+------------------------------
 Reporter:  pcfreak30     |       Owner:  (none)
     Type:  defect (bug)  |      Status:  new
 Priority:  normal        |   Milestone:  Awaiting Review
Component:  Cache API     |     Version:  trunk
 Severity:  normal        |  Resolution:
 Keywords:                |     Focuses:  performance
--------------------------+------------------------------

Comment (by johnjamesjacoby):

 Comments, Terms, Sites, and Networks will all exhibit exactly the same
 shortcoming.

 In general, querying for a large set of anything should be avoided,
 because it will not perform very well in most of the popular environments
 that WordPress is commonly running on.

 For the things that WordPress does itself internally, I find that this
 approach (and these functions) tend to work pretty well.

 For large sets of Posts, you can improve performance by opting out of
 priming Terms and Meta, but that may or may not actually be better or
 worse depending on several factors, including the environment itself but
 also what you plan on doing with the Posts and their relative Terms & Meta
 once you've primed their caches.

 Can you explain a bit more about your use-case and findings? Perhaps there
 are performance improvements that can be made to these approaches, but at
 a cursory review of them, I'm not seeing anything jump out at me.

-- 
Ticket URL: <https://core.trac.wordpress.org/ticket/49692#comment:1>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list