flushCaches should respect permitCacheFlushMode #21468
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Overview
There is an option to prevent cache flushes
CRM_Core_Config::isPermitCacheFlushMode()
(currently only used by the importer) but it's only respected if we flush caches via theCRM_Contact_BAO_Contact_Utils::clearContactCaches()
function which is bypassed by both opportunistic and deterministic (group contact) cache flushes. This means it's quite likely caches will be flushed anyway probably triggering deadlocks.Before
Group contact cache flushed even if
CRM_Core_Config::isPermitCacheFlushMode()
returns FALSE when opportunistic/deterministic cache flush is triggered.After
Group contact cache not flushed if
CRM_Core_Config::isPermitCacheFlushMode()
returns FALSE when opportunistic/deterministic cache flush is triggered.Technical Details
Comments
@eileenmcnaughton