jmdobry/angular-cache

Problem with operator 'in'

Closed this issue · 2 comments

I'm having trouble implementing angular-cache. I get this error:

TypeError: Cannot use 'in' operator to search for '/services/api/public/promotions?page=0&size=2' in null
    at Object.get (angular-cache.js:374)
    at sendReq (angular.js:10295)
    at status.$get.serverRequest (angular.js:10037)
    at processQueue (angular.js:14551)
    at angular.js:14567
    at Scope.parent.$get.Scope.$eval (angular.js:15830)
    at Scope.parent.$get.Scope.$digest (angular.js:15641)
    at Scope.parent.$get.Scope.$apply (angular.js:15935)
    at bootstrapApply (angular.js:1624)
    at Object.invoke (angular.js:4443)

I'm using AngularJS 1.4.1 and JQuery 2.1.4. Could you help me?

Did you destroy the cache and then try to use it?

The variable that is null is only set to null if the cache's destroy method has been called.

Thank You. Sorry for the inconvenience.