c# - Storing custom .Net objects in Azure Redis Cache with StackExchange.Redis -


We are implementing all information about three e-commerce sites (approximately 18,500 products) to be stored. The information is stored in a SQL Server database, mapped to custom objects, and then added to the Ezur Radius cache using this key naming convention:

  : {0}: {1}  

(where 0 is the store identifier and 1 is the product identifier). I was able to read and get matching keys with urine: products: {0} . The problem we are experiencing is that lots of GetAllProducts List & lt; Products & gt; , GetAllCategories list & lt; Categories & gt; and then used by the LINQ function.

Based on this:

  • I have collected all the products (a list of custom objects) in a key ( variant: products: all ) Have tried, but what is the suggestion of this method in the Azeure RDI cache that arise at that time? Or is it better to store each product in different keys?
  • I do not think every key is right in the loop to get every value. Is collection of keys / values ​​possible according to the pattern?
  • I have also read Hashish, although I do not think they help in our need.

I'm thinking of your approach to calling several records at once I advise to split more than a thousand records.

Redis only have very limited features, so your requirement may not be met. Redis cache or simple key-value is good for recipients and setter, for this you can consider other memory-based databases such as Mongodi.

In your case, rediscover set is the best way to combine or subtract with given conditions, or hash for asset-based object storage. Whatever approach you choose, you will use two or more datasets because the Redis datatype is not so versatile.

Redisbookbooks have given a good example.


Comments

Popular posts from this blog

java - Can't add JTree to JPanel of a JInternalFrame -

javascript - data.match(var) not working it seems -

javascript - How can I pause a jQuery .each() loop, while waiting for user input? -