0

I am trying to understand when someone would use AddItemToSet vs StoreRelatedEntities.

It seems the former is a way to associate a set label with a string-based item handle.

The latter is a way to associate two entities, which seems like a more generalized operation.

What is it that AddItemToSet does that StoreRelatedEntities can't do?

Thanks

t316
  • 1,149
  • 1
  • 15
  • 28

1 Answers1

0

The AddItemToSet API in ServiceStack.Redis is a 1:1 mapping that calls Redis' Server SADD Operation, i.e. adds an item to a Redis SET.

The StoreRelatedEntities is a higher-level operation that also maintains an index containing relationship between the entities described in detail in this Storing Related Entities in Redis answer.

Community
  • 1
  • 1
mythz
  • 141,670
  • 29
  • 246
  • 390