WordPress.org

Make WordPress Core

Opened 4 months ago

Last modified 13 days ago

#43233 new enhancement

Network transients

Reported by: spacedmonkey Owned by:
Milestone: 5.0 Priority: normal
Severity: normal Version: 2.9
Component: Networks and Sites Keywords: has-patch 2nd-opinion needs-testing
Focuses: multisite Cc:

Description

Currently site (network) transients do not support multi network. For sites with object caching it stores the transient as a global and for sites without object caching, it stores it on the current networks options. This is a strange behavour, as object cached sites act very differet from none.

The behaviour should be the same on both types of site and how type of store a network transient should be better defined. Is it a global store or a network level store.

Attachments (2)

43233.diff (11.4 KB) - added by spacedmonkey 4 months ago.
43233.2.diff (12.2 KB) - added by spacedmonkey 4 months ago.

Download all attachments as: .zip

Change History (8)

@spacedmonkey
4 months ago

#1 @johnjamesjacoby
4 months ago

  • Keywords 2nd-opinion needs-testing added

Patch looks great at a cursory. Needs deeper testing, so added a few keywords to that effect.

👍

#2 @flixos90
4 months ago

  • Milestone changed from Awaiting Review to 5.0

+1 for this change.

We should pay attention to how people may be using this, but I think the general perception has always been this is network-wide storage (storing in a global cache key seems like an oversight/bug to me). And since it only affects multi-network, we should be safe. I also like the direction of changing the function names and bringing them in line with the network option functions.

I agree this needs thorough testing as well and possibly further unit tests, but should be doable for 5.0.

This ticket was mentioned in Slack in #core-multisite by spacedmonkey. View the logs.


4 months ago

#4 @spacedmonkey
4 months ago

43233.2.diff is a small bug fix, to make sure that $network_id param is always a int, and if not set, just use the current network id.

This ticket was mentioned in Slack in #core-multisite by spacedmonkey. View the logs.


3 months ago

#6 @flixos90
13 days ago

We should hold off this until we've determined how to implement and solve the network meta / network option problem (see #37181).

Note: See TracTickets for help on using tickets.