I would like to store serialized objects in Redis from a database table with a compound primary key of two values. The objects might look like the following in code:
Public Class Contact
Public Property Instance_Id() As Long
Public Property Contact_Id() As Long
Public Property First_Name() As String
Public Property Last_Name() As String
End Class
The Instance_Id is shared amongst a group of contacts, and the Contact_Id value is unique to each contact.
What is the fastest and most memory efficient way to store these objects in Redis where I can retrieve all the Contacts with a specific Instance_Id, or just the one Contact with a specific Contact_Id ?