Reputation: 1459
I'm developing a windows server application which primary functions are to store object data (may come in serialized objects or jsons or xmls or binaries) and retrieve them in a very fast way.
I read that a lot of people are recommending redis.io and also the fact the stackexchange has the necessary bindings makes me want to go this route.
The problem is i don't get the idea of how to come up with the "key" value in order to store that particular data in the db. Am i supposed to resort to hashed value as the key? or is there an auto-created key i can use in redis.io ?
Thank you.
Upvotes: 0
Views: 1637
Reputation: 6421
Yes, Redis can be used for object caching and Stack Exchange's Redis client for C# works pretty well.
Few things:
id
of your own. Form a key like class-full-name#object_id
, where you generate the object id.Object.GetHashCode()
.List<Employee>
, change them to Dictionary<String, Employee>
(where key is the object id)Upvotes: 2