Single detail pages not cached?


#1

I have a detail page that has url setup something like this

url: '/product/:idProduct'

And this page doesn’t get cached by default, but the page before (product listing) it is, so I’m guessing it is related with “unique” url based on the product id.

So when I open a product, that controller is always reloaded, is there something I’m doing wrong or this is how ionic handles the cache? As I’m getting that product information from online, I want to avoid doing the request everytime user opens that product, any way cache can be turned on on that type of pages?

thanks
d


#2

per default only “backviews”-are gonna cached.

If your product page is the endpoint of your navigation structure --> it is not cached:
Home --> product list --> product Detail (you only can go back to list and to another detail page)

you can activate forward-caching via the $ionicConfigProvider
http://ionicframework.com/docs/api/provider/$ionicConfigProvider/

$ionicConfigProvider.views.forwardCache(true);

#3

Awesome, that was it.

thank you!