1 min readMay 19, 2019
If I understand it correctly, you are asking “Why we need to hit the back-end API again if we already have data on client side?”
The approach I wrote above is useful when we want a single place to cache GET api responses instead of caching separately in each service class, which means your code can just blindly make get request call from anywhere and will be returned cached response without hitting the back-end again. You don’t have to cache the response anywhere else, in component OR service etc.