Skip to content Skip to sidebar Skip to footer

Using Map To Cache For Around 5000 Entries In Javascript Apllication Vs Redis

I have a PRICE_MAPPER table at my DB It has around 5000 entries Price is determined on 3 entry types A B C ---> 300 (col1:A , col2:B , col3:C , colPrice:300) X Y Z ---> 500 .

Solution 1:

If you are going to have one single instance in your node.js application use internal memory to store your data.

However, be sure that if the process goes down, you have to put that data back to memory!

Using REDIS could be a good solution if you think that you will have multiple instances to read the same shared map from the memory and if there are simultaneous changes on that map.

Post a Comment for "Using Map To Cache For Around 5000 Entries In Javascript Apllication Vs Redis"