Friday 19 May 2017

Cache array of objects in node js

I have a schools social network, every school has a a number of dashboards that the students can post in it, since I don't want to go to the database every time a student want to see a dashboard I thought to build a cache system for the schools, at the beginning I created a module that creates a hash map to hold the School objects, in every School object I have a similar hash map for the dashboards and the same in every dashboard to hold the Post objects (I don't know if this is a common way or even acceptable at all), recently while searching for another approach I read about redis which is a key-value store system in memory.
My question: is it possible to achieve what I want in redis (since its a key-value store system) or even any other cache module or simply to stuck with what I have in hands?
Thanks in advance



via Rawhi

No comments:

Post a Comment