'fixes' an issue where you can get any property value back due to the incorrect cache key being used

This commit is contained in:
Shannon
2018-05-08 16:01:20 +10:00
parent 7728dfa853
commit 389fb100bb
3 changed files with 26 additions and 23 deletions

View File

@@ -20,7 +20,11 @@ namespace Umbraco.Core.Collections
public CompositeStringStringKey(string key1, string key2)
{
_key1 = key1?.ToLowerInvariant() ?? "NULL";
_key2 = key2?.ToLowerInvariant() ?? "NULL";
//fixme - we are changing this to null if it is an empty string, this is because if we don't do this than this key will not match
// anything see comments http://issues.umbraco.org/issue/U4-11227#comment=67-46399
// since we're not dealing with segments right now and I just need to get something working, this is the 'fix'
_key2 = !key2.IsNullOrWhiteSpace() ? key2.ToLowerInvariant() : "NULL";
}
public bool Equals(CompositeStringStringKey other)