Closed scheffield closed 10 years ago
The only reason it works the way it does now it because that's how $cacheFactory
works. I can add .createCache
in a backwards compatible way though.
Hi,
that would fix the warning. But to work more like $cacheFactory
it would be much better you call it dsCacheFactory
.
BTW: why don't you get a jshint warning? You use "newcap": true"
in your .jshintrc
too.
A call like
produces a JSHint warning if the option
newcap
is activated.Generally, I think there are two possible solutions
createCache
IMHO 2. is the right one, because calling a factory directly doesn't look very naturally to me. This would look like the following: