Fixed CreateSacrificeCacheKey failing to create key from MongoIds #456

This commit is contained in:
Chomp
2025-07-06 13:10:48 +01:00
parent d1af6bf6e3
commit 356e6de7ed
@@ -962,19 +962,13 @@ public class CircleOfCultistService(
}
/// <summary>
/// Temporary until MongoId conversion is done, should be removed and the mongoid one kept in place
/// Create an MD5 hash of the passed in items
/// </summary>
/// <param name="requiredItems"></param>
/// <returns></returns>
protected string CreateSacrificeCacheKey(IEnumerable<string> requiredItems)
{
var concat = string.Join(",", requiredItems.OrderBy(item => item));
return hashUtil.GenerateHashForData(HashingAlgorithm.MD5, concat);
}
/// <param name="requiredItems">Items to create key for</param>
/// <returns>Key</returns>
protected string CreateSacrificeCacheKey(IEnumerable<MongoId> requiredItems)
{
var concat = string.Join(",", requiredItems.OrderBy(item => item));
var concat = string.Join(",", requiredItems.OrderBy(item => item.ToString()));
return hashUtil.GenerateHashForData(HashingAlgorithm.MD5, concat);
}