{"action":"created","issue":{"url":"https://api.github.com/repos/goodeggs/angular-cached-resource/issues/60","labels_url":"https://api.github.com/repos/goodeggs/angular-cached-resource/issues/60/labels{/name}","comments_url":"https://api.github.com/repos/goodeggs/angular-cached-resource/issues/60/comments","events_url":"https://api.github.com/repos/goodeggs/angular-cached-resource/issues/60/events","html_url":"https://github.com/goodeggs/angular-cached-resource/issues/60","id":53742132,"number":60,"title":"$cachedResource fire an OPTION  on load, which fail and repeat each X seconds.","user":{"login":"Xspirits","id":1380501,"avatar_url":"https://avatars.githubusercontent.com/u/1380501?v=3","gravatar_id":"","url":"https://api.github.com/users/Xspirits","html_url":"https://github.com/Xspirits","followers_url":"https://api.github.com/users/Xspirits/followers","following_url":"https://api.github.com/users/Xspirits/following{/other_user}","gists_url":"https://api.github.com/users/Xspirits/gists{/gist_id}","starred_url":"https://api.github.com/users/Xspirits/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Xspirits/subscriptions","organizations_url":"https://api.github.com/users/Xspirits/orgs","repos_url":"https://api.github.com/users/Xspirits/repos","events_url":"https://api.github.com/users/Xspirits/events{/privacy}","received_events_url":"https://api.github.com/users/Xspirits/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":3,"created_at":"2015-01-08T11:45:49Z","updated_at":"2015-01-12T19:45:49Z","closed_at":"2015-01-12T19:45:49Z","body":"Well this is kind of an odd case, but I get a cycling option firing each X seconds (each 20s I'd say), which fail because... I didn't make any actual call.\r\n\r\nThis is the error :\r\n```\r\n OPTIONS http://myAPI.com/ angular.js:9814 \r\n\r\n(anonymous function)angular.js:9615\r\nsendReq angular.js:9331\r\n$get.serverRequest angular.js:13170\r\nprocessQueue angular.js:13186 \r\n(anonymous function ) angular.js:14383 \r\n$get.Scope.$eval angular.js:14199 \r\n$get.Scope.$digest angular.js:14488 \r\n$get.Scope.$apply angular.js:16214 \r\n(anonymous function) angular.js:4902 \r\ncompleteOutstandingRequest angular.js:5282\r\n(anonymous function)\r\n\r\nXMLHttpRequest cannot load http://myAPI.com/. Invalid HTTP status code 405 (index):1 \r\n```\r\n\r\nNotice that this is an `option` call.\r\nHere is the code snippet creating the loop:\r\n```\r\n        Acaci: $cachedResource('acaci', API + ':ep/:s/:id/:extra',  {}, {\r\n          get: {\r\n            method:'GET',\r\n            timeout: 1500,\r\n            params: {\r\n              s:'@s',\r\n              ep:'@ep',\r\n              id:'@id',\r\n              extra:'@extra'\r\n            }\r\n          },\r\n          create: {\r\n            method:'POST',\r\n            headers: {\r\n              'Content-Type': 'application/json'\r\n            },\r\n            params: {\r\n              s:'@s',\r\n              ep:'@ep',\r\n              id:'@id',\r\n              extra:'@extra'\r\n            }\r\n          },\r\n          erase: {\r\n            method:'DELETE',\r\n            headers: {\r\n              'Content-Type': 'application/json'\r\n            },\r\n            params: {\r\n              s:'@s',\r\n              ep:'@ep',\r\n              id:'@id',\r\n              extra:'@extra'\r\n            }\r\n          },\r\n          update: {\r\n            method:'PUT',\r\n            headers: {\r\n              'Content-Type': 'application/json'\r\n            },\r\n            params: {\r\n              s:'@s',\r\n              ep:'@ep',\r\n              id:'@id',\r\n              extra:'@extra'\r\n            }\r\n          }\r\n        }),\r\n```\r\n\r\nReplacing `cachedResource` by `ressource` stops the Option cycle, that's why I think this is from angular-cached-resource.\r\n\r\nThis happen on any page of the app, right on load."},"comment":{"url":"https://api.github.com/repos/goodeggs/angular-cached-resource/issues/comments/69632559","html_url":"https://github.com/goodeggs/angular-cached-resource/issues/60#issuecomment-69632559","issue_url":"https://api.github.com/repos/goodeggs/angular-cached-resource/issues/60","id":69632559,"user":{"login":"demands","id":443070,"avatar_url":"https://avatars.githubusercontent.com/u/443070?v=3","gravatar_id":"","url":"https://api.github.com/users/demands","html_url":"https://github.com/demands","followers_url":"https://api.github.com/users/demands/followers","following_url":"https://api.github.com/users/demands/following{/other_user}","gists_url":"https://api.github.com/users/demands/gists{/gist_id}","starred_url":"https://api.github.com/users/demands/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/demands/subscriptions","organizations_url":"https://api.github.com/users/demands/orgs","repos_url":"https://api.github.com/users/demands/repos","events_url":"https://api.github.com/users/demands/events{/privacy}","received_events_url":"https://api.github.com/users/demands/received_events","type":"User","site_admin":false},"created_at":"2015-01-12T19:45:49Z","updated_at":"2015-01-12T19:45:49Z","body":"Feel free to reopen this issue if this doesn't solve your problem!"}}