I am storing data from my database into ObjectCache.
Looping through each row using a for
statement whilst inserting a new object into the cache using .Set()
Data stores fine, except, its completely out of order than the original data set from the database. How am I able to preserve the original sort order of inserting into the cache?
I want to avoid remaking the Dictionary<string,object>
in the ObjectCache so that it sorts how I want after it's been inserted since it's a lot more work than I was hoping for. Anyone know how to preserve the original sort order when adding to the cache? Unfortunately sorting the key won't help, it needs to be sorted by a field in the object
.