Closed cameronterry closed 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.
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.
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 inDarkMatter_Primary
is causing the excessive database calls.wp_cache_set()
, which forgot to include the value - the domain (mappeddomain1.test
) - and was instead setting it todark-matter
which is the cache group.get()
methodDarkMatter_Primary
was still calling its ownset()
method, which was causing even cache miss to essentially issue anUPDATE
SQL query. This has been removed as it is handled byDarkMatter_Domains
now.