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

WordPress Trac noreply at wordpress.org
Tue Aug 30 14:24:32 UTC 2016


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

Comment (by achbed):

 Replying to [comment:5 boonebgorges]:
 > From this, I conclude that `cache_results` doesn't really do what it was
 meant to do. If anything, it should be removed altogether.

 Are there any backwards-compatible reasons to not remove/ignore the
 parameter?  The only thing I can think of is a slight performance hit if
 we're now no longer updating the metadata and/or taxonomy caches.  I think
 that's acceptable.

 > What is the reason for wanting to prevent post objects from being loaded
 into the cache? Is it a performance issue like described in #12611? If so,
 I wonder if we could mostly mitigate the issue with cache multi-get and
 multi-set, which would dramatically reduce the number of round-trips
 necessary to load data into the cache; see #20875.

 The only reason I can think of is if the post includes some data that
 changes very often (for example - some plugin is attaching random or API
 data to a post at load time). In that case they're probably
 `doing_it_wrong()` and should be discouraged anyway so that we can use the
 cache properly.

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


More information about the wp-trac mailing list