Further caching fix - use metadata cache #24294
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
Further caching fix - use metadata cache
Before
This cache access construct
$optionValues =
CRM_Utils_Cache::singleton()->get($cacheKey);`After
Uses
Technical Details
This is a performance fix - for
Redis
users the current method never uses the array cache whereas the latter does. In conjunction with #24156 I got about another 10% improvement on Contact updates in our staging environment.The data is a bit murky in prod as I accidentally undeployed the first patch when I first deployed this (where it the U goes back up again) & then when I re-deployed (where it shoots back down again) our high volume ended just as it was starting to look like this would show a clear-cut boost (those zig-zags at the end are when traffic slowed & we started working with a colder cache / less consistent run size)
Comments