I´m testing the Redis, but I have a problem. If I store over 8000 items, lose more than 2 records. The amount of data lost is proportional to the amount of records inserted.
class ProdutoDTO
{
public long id { get; set; }
public string name { get; set; }
}
using (var produtosRedis = redisClient.GetTypedClient<ProdutoDTO>())
{
for (var i = 0; i < 15000; i++)
{
ProdutoDTO produto = new ProdutoDTO();
produto.id = produtosRedis.GetNextSequence();
produto.name = "test" + produto.id.ToString();
produtosRedis.Store(produto);
}
}
I solved:
Old code:
class ProdutoDTO {
public long id { get; set; }
public string name { get; set; }
}
New code:
class ProdutoDTO {
public long Id { get; set; }
public string name { get; set; }
}
Because, C# Redis Client works with any POCOs that have a single primary key - which by default is expected to be Id.
More information about C# Redis: ServiceStack.Net Redis: Storing Related Objects vs. Related Object Ids