[wp-trac] [WordPress Trac] #40362: Remove `blog-id-cache` cache group

WordPress Trac noreply at wordpress.org
Thu Jun 5 12:09:58 UTC 2025


#40362: Remove `blog-id-cache` cache group
-------------------------------------------------+-------------------------
 Reporter:  flixos90                             |       Owner:  (none)
     Type:  defect (bug)                         |      Status:  new
 Priority:  normal                               |   Milestone:  Awaiting
                                                 |  Review
Component:  Networks and Sites                   |     Version:
 Severity:  normal                               |  Resolution:
 Keywords:  has-patch 2nd-opinion has-unit-      |     Focuses:  multisite
  tests                                          |
-------------------------------------------------+-------------------------

Comment (by heikomamerow):

 Ok, see the point. Should we close the ticket then?

 Replying to [comment:13 johnjamesjacoby]:
 > Replying to [comment:5 flixos90]:
 > > Per bug-scrub discussion:
 > >
 > > Maybe we should hold off removing that cache, although it's redundant.
 That is because `WP_Site_Query` caches are invalidated on every change to
 any site (via `last_changed`), while `blog-id-cache` keys are only
 invalidated on updates to the specific site. So the `blog-id-cache` keys
 are much more "stable".
 > >
 > > I'm not sure whether this is actually a reason to hold off, but we
 need to discuss and further investigate.
 >
 > Link to original discussion:
 https://wordpress.slack.com/archives/C03BVB47S/p1491848375654869
 >
 > `last_changed` cache invalidation is still an issue.
 >
 > Merging this PR will cause increased churn, specifically because of
 `wpmu_update_blogs_date()`, by way of
 `_update_blog_date_on_post_publish()` and
 `_update_blog_date_on_post_delete()`.

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


More information about the wp-trac mailing list