{"action":"created","comment":{"url":"https://api.github.com/repos/aspnet/HttpAbstractions/pulls/comments/46981760","id":46981760,"diff_hunk":"@@ -49,15 +50,33 @@ void IFeatureCache.CheckFeaturesRevision()\n         {\n             if (_cachedFeaturesRevision !=_features.Revision)\n             {\n-                _items = null;\n-                _serviceProviders = null;\n-                _authentication = null;\n-                _lifetime = null;\n-                _session = null;\n-                _cachedFeaturesRevision = _features.Revision;\n+                ResetFeatures();\n             }\n         }\n \n+        public void UpdateFeatures(IFeatureCollection features)\n+        {\n+            _features = features;\n+            ResetFeatures();\n+\n+            _request.UpdateFeatures(features);\n+            _response.UpdateFeatures(features);\n+\n+            _authenticationManager?.UpdateFeatures(features);\n+            _connection?.UpdateFeatures(features);\n+            _websockets?.UpdateFeatures(features);","path":"src/Microsoft.AspNet.Http/DefaultHttpContext.cs","position":48,"original_position":48,"commit_id":"e77d0d2549bf227026edc40914822b5e51cf61fb","original_commit_id":"130007737fe6d17feaa3d54df2d934dcced54649","user":{"login":"Tratcher","id":1821173,"avatar_url":"https://avatars.githubusercontent.com/u/1821173?v=3","gravatar_id":"","url":"https://api.github.com/users/Tratcher","html_url":"https://github.com/Tratcher","followers_url":"https://api.github.com/users/Tratcher/followers","following_url":"https://api.github.com/users/Tratcher/following{/other_user}","gists_url":"https://api.github.com/users/Tratcher/gists{/gist_id}","starred_url":"https://api.github.com/users/Tratcher/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Tratcher/subscriptions","organizations_url":"https://api.github.com/users/Tratcher/orgs","repos_url":"https://api.github.com/users/Tratcher/repos","events_url":"https://api.github.com/users/Tratcher/events{/privacy}","received_events_url":"https://api.github.com/users/Tratcher/received_events","type":"User","site_admin":false},"body":"*shrug* It's a probability question. We can figure it out based on profiles later.","created_at":"2015-12-08T17:06:13Z","updated_at":"2015-12-08T17:06:13Z","html_url":"https://github.com/aspnet/HttpAbstractions/pull/501#discussion_r46981760","pull_request_url":"https://api.github.com/repos/aspnet/HttpAbstractions/pulls/501","_links":{"self":{"href":"https://api.github.com/repos/aspnet/HttpAbstractions/pulls/comments/46981760"},"html":{"href":"https://github.com/aspnet/HttpAbstractions/pull/501#discussion_r46981760"},"pull_request":{"href":"https://api.github.com/repos/aspnet/HttpAbstractions/pulls/501"}}},"pull_request":{"url":"https://api.github.com/repos/aspnet/HttpAbstractions/pulls/501","id":52794128,"html_url":"https://github.com/aspnet/HttpAbstractions/pull/501","diff_url":"https://github.com/aspnet/HttpAbstractions/pull/501.diff","patch_url":"https://github.com/aspnet/HttpAbstractions/pull/501.patch","issue_url":"https://api.github.com/repos/aspnet/HttpAbstractions/issues/501","number":501,"state":"open","locked":false,"title":"Allow feature cache to be updated","user":{"login":"benaadams","id":1142958,"avatar_url":"https://avatars.githubusercontent.com/u/1142958?v=3","gravatar_id":"","url":"https://api.github.com/users/benaadams","html_url":"https://github.com/benaadams","followers_url":"https://api.github.com/users/benaadams/followers","following_url":"https://api.github.com/users/benaadams/following{/other_user}","gists_url":"https://api.github.com/users/benaadams/gists{/gist_id}","starred_url":"https://api.github.com/users/benaadams/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/benaadams/subscriptions","organizations_url":"https://api.github.com/users/benaadams/orgs","repos_url":"https://api.github.com/users/benaadams/repos","events_url":"https://api.github.com/users/benaadams/events{/privacy}","received_events_url":"https://api.github.com/users/benaadams/received_events","type":"User","site_admin":false},"body":"No point in pooling if you can't actually update stuff; allows for a saving of 959KB per 4k requests\r\n\r\nSee: https://github.com/aspnet/benchmarks/pull/34/files#diff-a48f9d66e0bc9b9c9ec15dae230d8e50R167\r\n in https://github.com/aspnet/benchmarks/pull/34 for specific usage\r\n\r\nResolves #502\r\n\r\nAllocation details when pooling (in benchmarks repo), usual stuff, 4k requests, 16 pipelined, using FF\r\n\r\nPre-allocations for DefaultContext 1.12MB\r\n\r\n![before-allocs](http://aoa.blob.core.windows.net/aspnet/pooled-context-pre.png)\r\n\r\nPost-allocations for DefaultContext 160KB\r\n \r\n![after-allocs](http://aoa.blob.core.windows.net/aspnet/pooled-context-post.png)\r\n\r\nAlmost all of which is logging scope\r\n\r\n![before-allocs](http://aoa.blob.core.windows.net/aspnet/pooled-context-post-logging.png)\r\n\r\n","created_at":"2015-12-06T23:27:56Z","updated_at":"2015-12-08T17:06:13Z","closed_at":null,"merged_at":null,"merge_commit_sha":"40aed118af60608252e7f8c318e6a7c248106528","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/aspnet/HttpAbstractions/pulls/501/commits","review_comments_url":"https://api.github.com/repos/aspnet/HttpAbstractions/pulls/501/comments","review_comment_url":"https://api.github.com/repos/aspnet/HttpAbstractions/pulls/comments{/number}","comments_url":"https://api.github.com/repos/aspnet/HttpAbstractions/issues/501/comments","statuses_url":"https://api.github.com/repos/aspnet/HttpAbstractions/statuses/e77d0d2549bf227026edc40914822b5e51cf61fb","head":{"label":"benaadams:feature-cache-update","ref":"feature-cache-update","sha":"e77d0d2549bf227026edc40914822b5e51cf61fb","user":{"login":"benaadams","id":1142958,"avatar_url":"https://avatars.githubusercontent.com/u/1142958?v=3","gravatar_id":"","url":"https://api.github.com/users/benaadams","html_url":"https://github.com/benaadams","followers_url":"https://api.github.com/users/benaadams/followers","following_url":"https://api.github.com/users/benaadams/following{/other_user}","gists_url":"https://api.github.com/users/benaadams/gists{/gist_id}","starred_url":"https://api.github.com/users/benaadams/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/benaadams/subscriptions","organizations_url":"https://api.github.com/users/benaadams/orgs","repos_url":"https://api.github.com/users/benaadams/repos","events_url":"https://api.github.com/users/benaadams/events{/privacy}","received_events_url":"https://api.github.com/users/benaadams/received_events","type":"User","site_admin":false},"repo":{"id":40780505,"name":"HttpAbstractions","full_name":"benaadams/HttpAbstractions","owner":{"login":"benaadams","id":1142958,"avatar_url":"https://avatars.githubusercontent.com/u/1142958?v=3","gravatar_id":"","url":"https://api.github.com/users/benaadams","html_url":"https://github.com/benaadams","followers_url":"https://api.github.com/users/benaadams/followers","following_url":"https://api.github.com/users/benaadams/following{/other_user}","gists_url":"https://api.github.com/users/benaadams/gists{/gist_id}","starred_url":"https://api.github.com/users/benaadams/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/benaadams/subscriptions","organizations_url":"https://api.github.com/users/benaadams/orgs","repos_url":"https://api.github.com/users/benaadams/repos","events_url":"https://api.github.com/users/benaadams/events{/privacy}","received_events_url":"https://api.github.com/users/benaadams/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/benaadams/HttpAbstractions","description":"HTTP abstractions such as HttpRequest, HttpResponse, and HttpContext, as well as common web utilities.","fork":true,"url":"https://api.github.com/repos/benaadams/HttpAbstractions","forks_url":"https://api.github.com/repos/benaadams/HttpAbstractions/forks","keys_url":"https://api.github.com/repos/benaadams/HttpAbstractions/keys{/key_id}","collaborators_url":"https://api.github.com/repos/benaadams/HttpAbstractions/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/benaadams/HttpAbstractions/teams","hooks_url":"https://api.github.com/repos/benaadams/HttpAbstractions/hooks","issue_events_url":"https://api.github.com/repos/benaadams/HttpAbstractions/issues/events{/number}","events_url":"https://api.github.com/repos/benaadams/HttpAbstractions/events","assignees_url":"https://api.github.com/repos/benaadams/HttpAbstractions/assignees{/user}","branches_url":"https://api.github.com/repos/benaadams/HttpAbstractions/branches{/branch}","tags_url":"https://api.github.com/repos/benaadams/HttpAbstractions/tags","blobs_url":"https://api.github.com/repos/benaadams/HttpAbstractions/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/benaadams/HttpAbstractions/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/benaadams/HttpAbstractions/git/refs{/sha}","trees_url":"https://api.github.com/repos/benaadams/HttpAbstractions/git/trees{/sha}","statuses_url":"https://api.github.com/repos/benaadams/HttpAbstractions/statuses/{sha}","languages_url":"https://api.github.com/repos/benaadams/HttpAbstractions/languages","stargazers_url":"https://api.github.com/repos/benaadams/HttpAbstractions/stargazers","contributors_url":"https://api.github.com/repos/benaadams/HttpAbstractions/contributors","subscribers_url":"https://api.github.com/repos/benaadams/HttpAbstractions/subscribers","subscription_url":"https://api.github.com/repos/benaadams/HttpAbstractions/subscription","commits_url":"https://api.github.com/repos/benaadams/HttpAbstractions/commits{/sha}","git_commits_url":"https://api.github.com/repos/benaadams/HttpAbstractions/git/commits{/sha}","comments_url":"https://api.github.com/repos/benaadams/HttpAbstractions/comments{/number}","issue_comment_url":"https://api.github.com/repos/benaadams/HttpAbstractions/issues/comments{/number}","contents_url":"https://api.github.com/repos/benaadams/HttpAbstractions/contents/{+path}","compare_url":"https://api.github.com/repos/benaadams/HttpAbstractions/compare/{base}...{head}","merges_url":"https://api.github.com/repos/benaadams/HttpAbstractions/merges","archive_url":"https://api.github.com/repos/benaadams/HttpAbstractions/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/benaadams/HttpAbstractions/downloads","issues_url":"https://api.github.com/repos/benaadams/HttpAbstractions/issues{/number}","pulls_url":"https://api.github.com/repos/benaadams/HttpAbstractions/pulls{/number}","milestones_url":"https://api.github.com/repos/benaadams/HttpAbstractions/milestones{/number}","notifications_url":"https://api.github.com/repos/benaadams/HttpAbstractions/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/benaadams/HttpAbstractions/labels{/name}","releases_url":"https://api.github.com/repos/benaadams/HttpAbstractions/releases{/id}","created_at":"2015-08-15T19:30:35Z","updated_at":"2015-08-15T19:30:36Z","pushed_at":"2015-12-08T14:22:39Z","git_url":"git://github.com/benaadams/HttpAbstractions.git","ssh_url":"git@github.com:benaadams/HttpAbstractions.git","clone_url":"https://github.com/benaadams/HttpAbstractions.git","svn_url":"https://github.com/benaadams/HttpAbstractions","homepage":"","size":2136,"stargazers_count":0,"watchers_count":0,"language":"C#","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"dev"}},"base":{"label":"aspnet:dev","ref":"dev","sha":"5231683aae4d771908205adc4c24040733dd9ace","user":{"login":"aspnet","id":6476660,"avatar_url":"https://avatars.githubusercontent.com/u/6476660?v=3","gravatar_id":"","url":"https://api.github.com/users/aspnet","html_url":"https://github.com/aspnet","followers_url":"https://api.github.com/users/aspnet/followers","following_url":"https://api.github.com/users/aspnet/following{/other_user}","gists_url":"https://api.github.com/users/aspnet/gists{/gist_id}","starred_url":"https://api.github.com/users/aspnet/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/aspnet/subscriptions","organizations_url":"https://api.github.com/users/aspnet/orgs","repos_url":"https://api.github.com/users/aspnet/repos","events_url":"https://api.github.com/users/aspnet/events{/privacy}","received_events_url":"https://api.github.com/users/aspnet/received_events","type":"Organization","site_admin":false},"repo":{"id":15320915,"name":"HttpAbstractions","full_name":"aspnet/HttpAbstractions","owner":{"login":"aspnet","id":6476660,"avatar_url":"https://avatars.githubusercontent.com/u/6476660?v=3","gravatar_id":"","url":"https://api.github.com/users/aspnet","html_url":"https://github.com/aspnet","followers_url":"https://api.github.com/users/aspnet/followers","following_url":"https://api.github.com/users/aspnet/following{/other_user}","gists_url":"https://api.github.com/users/aspnet/gists{/gist_id}","starred_url":"https://api.github.com/users/aspnet/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/aspnet/subscriptions","organizations_url":"https://api.github.com/users/aspnet/orgs","repos_url":"https://api.github.com/users/aspnet/repos","events_url":"https://api.github.com/users/aspnet/events{/privacy}","received_events_url":"https://api.github.com/users/aspnet/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/aspnet/HttpAbstractions","description":"HTTP abstractions such as HttpRequest, HttpResponse, and HttpContext, as well as common web utilities.","fork":false,"url":"https://api.github.com/repos/aspnet/HttpAbstractions","forks_url":"https://api.github.com/repos/aspnet/HttpAbstractions/forks","keys_url":"https://api.github.com/repos/aspnet/HttpAbstractions/keys{/key_id}","collaborators_url":"https://api.github.com/repos/aspnet/HttpAbstractions/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/aspnet/HttpAbstractions/teams","hooks_url":"https://api.github.com/repos/aspnet/HttpAbstractions/hooks","issue_events_url":"https://api.github.com/repos/aspnet/HttpAbstractions/issues/events{/number}","events_url":"https://api.github.com/repos/aspnet/HttpAbstractions/events","assignees_url":"https://api.github.com/repos/aspnet/HttpAbstractions/assignees{/user}","branches_url":"https://api.github.com/repos/aspnet/HttpAbstractions/branches{/branch}","tags_url":"https://api.github.com/repos/aspnet/HttpAbstractions/tags","blobs_url":"https://api.github.com/repos/aspnet/HttpAbstractions/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/aspnet/HttpAbstractions/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/aspnet/HttpAbstractions/git/refs{/sha}","trees_url":"https://api.github.com/repos/aspnet/HttpAbstractions/git/trees{/sha}","statuses_url":"https://api.github.com/repos/aspnet/HttpAbstractions/statuses/{sha}","languages_url":"https://api.github.com/repos/aspnet/HttpAbstractions/languages","stargazers_url":"https://api.github.com/repos/aspnet/HttpAbstractions/stargazers","contributors_url":"https://api.github.com/repos/aspnet/HttpAbstractions/contributors","subscribers_url":"https://api.github.com/repos/aspnet/HttpAbstractions/subscribers","subscription_url":"https://api.github.com/repos/aspnet/HttpAbstractions/subscription","commits_url":"https://api.github.com/repos/aspnet/HttpAbstractions/commits{/sha}","git_commits_url":"https://api.github.com/repos/aspnet/HttpAbstractions/git/commits{/sha}","comments_url":"https://api.github.com/repos/aspnet/HttpAbstractions/comments{/number}","issue_comment_url":"https://api.github.com/repos/aspnet/HttpAbstractions/issues/comments{/number}","contents_url":"https://api.github.com/repos/aspnet/HttpAbstractions/contents/{+path}","compare_url":"https://api.github.com/repos/aspnet/HttpAbstractions/compare/{base}...{head}","merges_url":"https://api.github.com/repos/aspnet/HttpAbstractions/merges","archive_url":"https://api.github.com/repos/aspnet/HttpAbstractions/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/aspnet/HttpAbstractions/downloads","issues_url":"https://api.github.com/repos/aspnet/HttpAbstractions/issues{/number}","pulls_url":"https://api.github.com/repos/aspnet/HttpAbstractions/pulls{/number}","milestones_url":"https://api.github.com/repos/aspnet/HttpAbstractions/milestones{/number}","notifications_url":"https://api.github.com/repos/aspnet/HttpAbstractions/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/aspnet/HttpAbstractions/labels{/name}","releases_url":"https://api.github.com/repos/aspnet/HttpAbstractions/releases{/id}","created_at":"2013-12-19T19:38:45Z","updated_at":"2015-12-02T07:55:33Z","pushed_at":"2015-12-08T14:22:39Z","git_url":"git://github.com/aspnet/HttpAbstractions.git","ssh_url":"git@github.com:aspnet/HttpAbstractions.git","clone_url":"https://github.com/aspnet/HttpAbstractions.git","svn_url":"https://github.com/aspnet/HttpAbstractions","homepage":"","size":2367,"stargazers_count":122,"watchers_count":122,"language":"C#","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":61,"mirror_url":null,"open_issues_count":43,"forks":61,"open_issues":43,"watchers":122,"default_branch":"dev"}},"_links":{"self":{"href":"https://api.github.com/repos/aspnet/HttpAbstractions/pulls/501"},"html":{"href":"https://github.com/aspnet/HttpAbstractions/pull/501"},"issue":{"href":"https://api.github.com/repos/aspnet/HttpAbstractions/issues/501"},"comments":{"href":"https://api.github.com/repos/aspnet/HttpAbstractions/issues/501/comments"},"review_comments":{"href":"https://api.github.com/repos/aspnet/HttpAbstractions/pulls/501/comments"},"review_comment":{"href":"https://api.github.com/repos/aspnet/HttpAbstractions/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/aspnet/HttpAbstractions/pulls/501/commits"},"statuses":{"href":"https://api.github.com/repos/aspnet/HttpAbstractions/statuses/e77d0d2549bf227026edc40914822b5e51cf61fb"}}}}