{"action":"created","issue":{"url":"https://api.github.com/repos/fsprojects/Paket/issues/1101","labels_url":"https://api.github.com/repos/fsprojects/Paket/issues/1101/labels{/name}","comments_url":"https://api.github.com/repos/fsprojects/Paket/issues/1101/comments","events_url":"https://api.github.com/repos/fsprojects/Paket/issues/1101/events","html_url":"https://github.com/fsprojects/Paket/pull/1101","id":109131357,"number":1101,"title":"Memoize to reduce web requests to external sites like GitHub.","user":{"login":"Thorium","id":229355,"avatar_url":"https://avatars.githubusercontent.com/u/229355?v=3","gravatar_id":"","url":"https://api.github.com/users/Thorium","html_url":"https://github.com/Thorium","followers_url":"https://api.github.com/users/Thorium/followers","following_url":"https://api.github.com/users/Thorium/following{/other_user}","gists_url":"https://api.github.com/users/Thorium/gists{/gist_id}","starred_url":"https://api.github.com/users/Thorium/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Thorium/subscriptions","organizations_url":"https://api.github.com/users/Thorium/orgs","repos_url":"https://api.github.com/users/Thorium/repos","events_url":"https://api.github.com/users/Thorium/events{/privacy}","received_events_url":"https://api.github.com/users/Thorium/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":4,"created_at":"2015-09-30T16:34:30Z","updated_at":"2015-10-01T06:35:34Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/fsprojects/Paket/pulls/1101","html_url":"https://github.com/fsprojects/Paket/pull/1101","diff_url":"https://github.com/fsprojects/Paket/pull/1101.diff","patch_url":"https://github.com/fsprojects/Paket/pull/1101.patch"},"body":"I had some problems with GitHub:\r\nSystem.Net.WebException: The remote server returned an error: (403) Forbidden.\r\n\"API rate limit exceeded\"\r\nSo after this it shouldn't make duplicate network calls when resolving versions inside one Paket-command (like paket outdated or paket update).\r\n"},"comment":{"url":"https://api.github.com/repos/fsprojects/Paket/issues/comments/144633820","html_url":"https://github.com/fsprojects/Paket/pull/1101#issuecomment-144633820","issue_url":"https://api.github.com/repos/fsprojects/Paket/issues/1101","id":144633820,"user":{"login":"Thorium","id":229355,"avatar_url":"https://avatars.githubusercontent.com/u/229355?v=3","gravatar_id":"","url":"https://api.github.com/users/Thorium","html_url":"https://github.com/Thorium","followers_url":"https://api.github.com/users/Thorium/followers","following_url":"https://api.github.com/users/Thorium/following{/other_user}","gists_url":"https://api.github.com/users/Thorium/gists{/gist_id}","starred_url":"https://api.github.com/users/Thorium/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Thorium/subscriptions","organizations_url":"https://api.github.com/users/Thorium/orgs","repos_url":"https://api.github.com/users/Thorium/repos","events_url":"https://api.github.com/users/Thorium/events{/privacy}","received_events_url":"https://api.github.com/users/Thorium/received_events","type":"User","site_admin":false},"created_at":"2015-10-01T06:35:34Z","updated_at":"2015-10-01T06:35:34Z","body":"Lazy is due to the reason that ConcurrentDictionary is locking the threads during the update-action. So lazy will cause threads to be not locked while f is executed.\r\n\r\nJust tuple for the key should do well also. I just took the simplest and best memoize from fssnip.net to be the base implementation and improved that.\r\n\r\nYou can test this code with Tomas Petricek's Fibonacci, just replace his non-threadsafe memoize command with memoizeConcurrent: http://www.fssnip.net/8P\r\n"}}