ps0604
ps0604

Reputation: 1071

Traverse Angular cache factory

To retrieve an element from $cacheFactory you use cache.get('key1'), but how to traverse the list and obtain all the key/values?

Upvotes: 1

Views: 32

Answers (1)

Yoann Prot
Yoann Prot

Reputation: 524

I speak too fast, sorry...

In fact, it seems that it is not possible to do it. I searched into angular source code and cache is just a dummy JS Object. It is not accessible and no method allow you to access it directly.

Here is the code from the lastest angular version : $cacheFactory

Upvotes: 1

Related Questions