Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CRM-21124 fix error on cacheKey when too long #10921

Merged
merged 1 commit into from
Aug 31, 2017
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion CRM/Dedupe/Merger.php
Original file line number Diff line number Diff line change
Expand Up @@ -1914,7 +1914,7 @@ public static function getMergeCacheKeyString($rule_group_id, $group_id, $criter
$cacheKeyString = "merge {$contactType}";
$cacheKeyString .= $rule_group_id ? "_{$rule_group_id}" : '_0';
$cacheKeyString .= $group_id ? "_{$group_id}" : '_0';
$cacheKeyString .= !empty($criteria) ? serialize($criteria) : '_0';
$cacheKeyString .= !empty($criteria) ? md5(serialize($criteria)) : '_0';
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Probably a silly question, but from the description it looks like this key is stored in the database. When upgrading to the next version will the cache always be cleared? It would probably be harmless to have the old version of the cache key still in the database anyway, but just thought I'd check.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think upgrades do clear these out, or you can schedule a job to intermittently clear cache tables.

This is the sort of cache that just gets regenerated if empty. I can't see any risks on there being extraneous or missing entries

if ($checkPermissions) {
$contactID = CRM_Core_Session::getLoggedInContactID();
if (!$contactID) {
Expand Down