How to clear some page's caches?


The latest ionic added cache-view tag, it’s very good.
However, I want to clear some page’s caches when running app, but don’t use view-cache=‘false’.

  • $templateCache.removeAll() doesn’t work.
  • $state.go('xxxxx', {cache:false}} doesn’t work.

Any idea?

Ion-nav-view caching: function to invalidate item in cache by state name

Did you get any solution to this problem?


I didn’t find a good solution yet. But you can use the below code to refresh app, and the cache will also be wiped.



Good solution! I asked the same question and recieved different answers, I share the link of the discussion so you can check them out: Ionic Beta14: how to clean the Cache for a specific view?