Skip to content

Commit

Permalink
Improve Hash Code Distribution for RelationalCommandCache Keys (#34118)
Browse files Browse the repository at this point in the history
Fixes #34117
  • Loading branch information
ADNewsom09 committed Jul 9, 2024
1 parent 5f0887d commit 966df0e
Showing 1 changed file with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@

using System.Collections;
using System.Collections.Concurrent;
using System.Runtime.CompilerServices;
using Microsoft.Extensions.Caching.Memory;

namespace Microsoft.EntityFrameworkCore.Query.Internal;
Expand Down Expand Up @@ -154,6 +155,6 @@ public bool Equals(CommandCacheKey commandCacheKey)
}

public override int GetHashCode()
=> 0;
=> RuntimeHelpers.GetHashCode(_queryExpression);
}
}

0 comments on commit 966df0e

Please sign in to comment.