Just implemented a design where i had cached some data in hashmap and retrieved data from it instead querying the same data from DB.
Is my thinking correct ?
Keeping a copy of the data in memory would almost certainly be faster than fetching it from the DB.
That said, there are further considerations to be taken into account:
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With