craigwardman / ChunkingRedisClient

A C# library which implements various wrappers around the StackExchange.Redis client, specifically using Newtonsoft.Json serialisation; Such as streamed reading/writing and sliding expiration.
MIT License
2 stars 1 forks source link

GetHashCode is not a great idea for GenericKeygen #1

Closed craigwardman closed 5 years ago

craigwardman commented 5 years ago

There are several issues with using GetHashCode for creating distributed cache keys (such as collisions), mainly that two processes don't necessarily generate the same hash code for the same value which would break the key gen within a distributed system (which is exactly the purpose of using Redis 😄 )

Therefore I will be fixing this bug, which will probably mean there is no "non-intrusive default" way of calculating an objects key 😢

craigwardman commented 5 years ago

Closed with PR #2