What is the best way in AngularJs to save or cache temporary somewhere the resource result in order multiple directive which need the resource result to get it without requesting again and again the same resource in the server?
Imagine having 5 directives which all of them need the result of resource
This returns a json of accounts (REST API GET method).
What is the best practice to cache result of this resource or save it to a variable and then each directive get the data from this variable and avoid hitting the rest API more than once every 1 minute (so cache expires in 1 minute)
Thanks a lot.