{"action":"created","issue":{"url":"https://api.github.com/repos/morelinq/MoreLINQ/issues/100","labels_url":"https://api.github.com/repos/morelinq/MoreLINQ/issues/100/labels{/name}","comments_url":"https://api.github.com/repos/morelinq/MoreLINQ/issues/100/comments","events_url":"https://api.github.com/repos/morelinq/MoreLINQ/issues/100/events","html_url":"https://github.com/morelinq/MoreLINQ/issues/100","id":102436022,"number":100,"title":"add Memoize support","user":{"login":"atifaziz","id":20511,"avatar_url":"https://avatars.githubusercontent.com/u/20511?v=3","gravatar_id":"","url":"https://api.github.com/users/atifaziz","html_url":"https://github.com/atifaziz","followers_url":"https://api.github.com/users/atifaziz/followers","following_url":"https://api.github.com/users/atifaziz/following{/other_user}","gists_url":"https://api.github.com/users/atifaziz/gists{/gist_id}","starred_url":"https://api.github.com/users/atifaziz/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/atifaziz/subscriptions","organizations_url":"https://api.github.com/users/atifaziz/orgs","repos_url":"https://api.github.com/users/atifaziz/repos","events_url":"https://api.github.com/users/atifaziz/events{/privacy}","received_events_url":"https://api.github.com/users/atifaziz/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/morelinq/MoreLINQ/labels/enhancement","name":"enhancement","color":"84b6eb"},{"url":"https://api.github.com/repos/morelinq/MoreLINQ/labels/help%20wanted","name":"help wanted","color":"159818"},{"url":"https://api.github.com/repos/morelinq/MoreLINQ/labels/Type-Enhancement","name":"Type-Enhancement","color":"ededed"}],"state":"open","locked":false,"assignee":{"login":"morelinq","id":13901851,"avatar_url":"https://avatars.githubusercontent.com/u/13901851?v=3","gravatar_id":"","url":"https://api.github.com/users/morelinq","html_url":"https://github.com/morelinq","followers_url":"https://api.github.com/users/morelinq/followers","following_url":"https://api.github.com/users/morelinq/following{/other_user}","gists_url":"https://api.github.com/users/morelinq/gists{/gist_id}","starred_url":"https://api.github.com/users/morelinq/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/morelinq/subscriptions","organizations_url":"https://api.github.com/users/morelinq/orgs","repos_url":"https://api.github.com/users/morelinq/repos","events_url":"https://api.github.com/users/morelinq/events{/privacy}","received_events_url":"https://api.github.com/users/morelinq/received_events","type":"Organization","site_admin":false},"milestone":null,"comments":2,"created_at":"2015-08-21T18:14:52Z","updated_at":"2015-10-28T14:33:12Z","closed_at":null,"body":"I didn't see this as an existing issue when searching just now, but morelinq seems like a good place for a Memoize extension method.\r\n\r\nThe goal is to allow callers to iterate over a sequence multiple times, but caching the results so the inner/original sequence is still only iterated once.\r\n\r\nThe most common use case I've seen for this is when interacting with sql queries. If you use ToList/ToArray or the like (as many people do), you end up forcing your code to wait until all the results have been pulled into memory from the server.  Memoize improves this situation by allowing you to start pulling from the queryable immediately, but without having to incur the penalty if you end up needing to iterate over it multiple times (as the data gets cached as it's been pulled from the source).\r\n\r\nAn example gist can be found here to get across the idea:\r\n\r\nhttps://gist.github.com/thomaslevesque/3345186\r\n\r\n---\r\nOriginally reported on Google Code with ID 100\r\n\r\nReported by @jamesmanning on 2015-05-01 14:40:32\r\n"},"comment":{"url":"https://api.github.com/repos/morelinq/MoreLINQ/issues/comments/151863719","html_url":"https://github.com/morelinq/MoreLINQ/issues/100#issuecomment-151863719","issue_url":"https://api.github.com/repos/morelinq/MoreLINQ/issues/100","id":151863719,"user":{"login":"fsateler","id":1322013,"avatar_url":"https://avatars.githubusercontent.com/u/1322013?v=3","gravatar_id":"","url":"https://api.github.com/users/fsateler","html_url":"https://github.com/fsateler","followers_url":"https://api.github.com/users/fsateler/followers","following_url":"https://api.github.com/users/fsateler/following{/other_user}","gists_url":"https://api.github.com/users/fsateler/gists{/gist_id}","starred_url":"https://api.github.com/users/fsateler/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/fsateler/subscriptions","organizations_url":"https://api.github.com/users/fsateler/orgs","repos_url":"https://api.github.com/users/fsateler/repos","events_url":"https://api.github.com/users/fsateler/events{/privacy}","received_events_url":"https://api.github.com/users/fsateler/received_events","type":"User","site_admin":false},"created_at":"2015-10-28T14:33:12Z","updated_at":"2015-10-28T14:33:12Z","body":"I also found an implementation in the interactive extensions:\r\n\r\nhttp://rx.codeplex.com/SourceControl/latest#Ix.NET/Source/System.Interactive/EnumerableEx.Buffering.cs\r\n\r\nPerhaps no need to integrate here?"}}