How to clear some page's caches?


#1

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
#2

Did you get any solution to this problem?


#3

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.

$window.location.reload(true);


#4

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?