Expression caching

improved version of #9006 (which was an improved version of #8942)
I think I pointed out the same. I'm going to take a closer look at the
tests before merging.
On Sep 15, 2014 4:18 PM, "Caitlin Potter" <notifications@github.com> wrote:

> In test/ng/parseSpec.js:
>
> > +            $filterProvider.register('foo', valueFn(function(input) {
> > +              filterCalls++;
> > +              return input;
> > +            }));
> > +
> > +            var watcherCalls = 0;
> > +            scope.$watch($parse('{x: 1} | foo'), function(input) {
> > +              expect(input).toEqual({x:1});
> > +              watcherCalls++;
> > +            });
> > +            scope.$digest();
> > +            expect(filterCalls).toBe(1);
> > +            expect(watcherCalls).toBe(1);
> > +            scope.$digest();
> > +            expect(filterCalls).toBe(1);
> > +            expect(watcherCalls).toBe(1);
>
> I don't really understand this test --- "should calculate the literal
> every single time", but asserting that the filter and watcher was only
> called once in two digests.
>
> What are we actually testing here? That, because the inputs didn't change,
> we don't call the filter / consider the watch to have changed?
>
> —
> Reply to this email directly or view it on GitHub
> <https://github.com/angular/angular.js/pull/9082/files#r17543950>.
>