cameronterry / dark-matter

A highly opinionated domain mapping plugin for WordPress Networks
Other
12 stars 2 forks source link

Fix a malformed cache set #99

Closed cameronterry closed 2 years ago

cameronterry commented 2 years ago

This PR resolves issue: https://github.com/cameronterry/dark-matter/issues/98

After changing the logic for Primary domains database calls and cache setting, moving that into DarkMatter_Domains, it appears that one small bug and a leftover call in DarkMatter_Primary is causing the excessive database calls.

cameronterry commented 2 years ago

The fix during this was to flush cache, however that might not be feasible for some installs. Checking if that is actually a requirement.

cameronterry commented 2 years ago

The fix during this was to flush cache, however that might not be feasible for some installs. Checking if that is actually a requirement.

Simulating the deploy of 2.3.1 by switching between this branch and develop (which is 2.3.0), this change would have required a cache flush. However by moving the check and primary domain cache update to a different place, the need for installations using Dark Matter needing to run wp cache flush can be mitigated: https://github.com/cameronterry/dark-matter/pull/99/commits/5aa734aab61236dbd491544cf57a8ec850d121e4.