Know if a view is cached from a directive?

Hi guys!

One question… Is possible to know if a view is cached from a directive?

I need to use the following code from a directive

$scope.$on(’$ionicView.enter’, function () {
alert(“Yeah bb!”);
});

Or know if the view is cached :smile:

Thanks in advance!