Ionic header bar is missing

I am creating an app using ionic-material project. I have created a login page.After login it displays gallery page. If i do some action in other pages and return back to gallery page the i can’t see the header bar.
I have noticed one thing that when i command out this line “$ionicConfigProvider.views.maxCache(0);” in app.js the header bar will miss.otherwise it is fine.I don’t know what’s went wrong.Can anybody help me.