My current Environment - .NET Core 2.1, Redis-Server/cli 3.2 on Windows Server
I am currently trying to insert a large number keys into redis using the StackExchange.Redis Driver in my .NET core console application like this:
foreach (var item in collection)
{
var key = item.SomeKey;
var value = item.SomeValue;
//Tried Both Async and Sync
redisDatabase.StringSetAsync(key, value);
redisDatabase.StringSet(key, value);
}
Records are passed to the for-each in batches of 1000
My collection has close to 285000 records and therefore is inserting these many into the redis-server, but upon completion i can see only 250000 odd records in the database (after running the INFO redis-cli command).
Why is this happening?
I do know that for mass insertions it is better to go with the redis protocol but this is a temporary solution i need for now