[wp-trac] [WordPress Trac] #37762: cache_results parameter doesn't prevent queried posts from being added to cache

WordPress Trac noreply at wordpress.org
Mon Aug 29 15:34:48 UTC 2016


#37762: cache_results parameter doesn't prevent queried posts from being added to
cache
--------------------------+------------------------------
 Reporter:  Dang Vu       |       Owner:
     Type:  defect (bug)  |      Status:  new
 Priority:  normal        |   Milestone:  Awaiting Review
Component:  Query         |     Version:  4.6
 Severity:  normal        |  Resolution:
 Keywords:                |     Focuses:  performance
--------------------------+------------------------------

Comment (by achbed):

 What's interesting is that the individual posts are loaded and cached to
 the object cache individually, but the combined query result is what is
 controlled via the `cache_results` parameter. This seems to meet the
 defined parameter intent because it's not caching the full result of the
 query.  If the posts themselves change enough that you can't use object
 caching I'd be truly surprised.

 If you want to prevent the posts themselves from caching, that appears to
 be a different request and intent.  Maybe an additional `cache_posts`
 parameter to control that piece of the caching puzzle?

 We should update the docs at the very least to explain this behavior.

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


More information about the wp-trac mailing list