{"action":"created","issue":{"url":"https://api.github.com/repos/pingpong-labs/modules/issues/85","labels_url":"https://api.github.com/repos/pingpong-labs/modules/issues/85/labels{/name}","comments_url":"https://api.github.com/repos/pingpong-labs/modules/issues/85/comments","events_url":"https://api.github.com/repos/pingpong-labs/modules/issues/85/events","html_url":"https://github.com/pingpong-labs/modules/issues/85","id":53246141,"number":85,"title":"Caching feature: Maximum function nesting level of '100' reached, aborting! ","user":{"login":"nWidart","id":882397,"avatar_url":"https://avatars.githubusercontent.com/u/882397?v=3","gravatar_id":"","url":"https://api.github.com/users/nWidart","html_url":"https://github.com/nWidart","followers_url":"https://api.github.com/users/nWidart/followers","following_url":"https://api.github.com/users/nWidart/following{/other_user}","gists_url":"https://api.github.com/users/nWidart/gists{/gist_id}","starred_url":"https://api.github.com/users/nWidart/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/nWidart/subscriptions","organizations_url":"https://api.github.com/users/nWidart/orgs","repos_url":"https://api.github.com/users/nWidart/repos","events_url":"https://api.github.com/users/nWidart/events{/privacy}","received_events_url":"https://api.github.com/users/nWidart/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":3,"created_at":"2015-01-02T10:30:43Z","updated_at":"2015-02-02T05:12:15Z","closed_at":null,"body":"Hello,\r\n\r\nThere is an issue with the caching feature, whenever I enable the future I'm getting the following error:\r\n\r\n```\r\nMaximum function nesting level of '100' reached, aborting! \r\n```\r\n\r\nWhen I debug your code, I see a loop happening:\r\n\r\n1. method `all()` is called,\r\n2. method `getCached()` is called,\r\n3. method `toCollection()` is called,\r\n4. method `all()` is called again\r\n5. ... And so on.\r\n\r\n\r\n\r\n"},"comment":{"url":"https://api.github.com/repos/pingpong-labs/modules/issues/comments/72407254","html_url":"https://github.com/pingpong-labs/modules/issues/85#issuecomment-72407254","issue_url":"https://api.github.com/repos/pingpong-labs/modules/issues/85","id":72407254,"user":{"login":"tiran133","id":651050,"avatar_url":"https://avatars.githubusercontent.com/u/651050?v=3","gravatar_id":"","url":"https://api.github.com/users/tiran133","html_url":"https://github.com/tiran133","followers_url":"https://api.github.com/users/tiran133/followers","following_url":"https://api.github.com/users/tiran133/following{/other_user}","gists_url":"https://api.github.com/users/tiran133/gists{/gist_id}","starred_url":"https://api.github.com/users/tiran133/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tiran133/subscriptions","organizations_url":"https://api.github.com/users/tiran133/orgs","repos_url":"https://api.github.com/users/tiran133/repos","events_url":"https://api.github.com/users/tiran133/events{/privacy}","received_events_url":"https://api.github.com/users/tiran133/received_events","type":"User","site_admin":false},"created_at":"2015-02-02T05:12:15Z","updated_at":"2015-02-02T05:12:15Z","body":"Even if you change the ->all() call to ->scan() it is just an array what will get stored in the cache. If you retrieve it it will fail due to method calls of the cached array. You need to some how rebuild the Modules based on that array. But there is a lot more to change than due to its nature of the Json class. It uses the filesystem by default. I had a look into it but you need to basically change the whole implementation. How  the module interacts with the Json class."}}