I have implemented the following rule to clear template cache in my AngularJS application:
myApp.run(function ($rootScope, $templateCache) {
$rootScope.$on('$viewContentLoaded', function() {
$templateCache.removeAll();
});
});
However, I now need to remove only templates that are one day old, not all of them. How can I accomplish this?
The version of AngularJS I am using is 1.2.23
.