{"action":"created","comment":{"url":"https://api.github.com/repos/elixir-lang/plug/pulls/comments/22441643","id":22441643,"diff_hunk":"@@ -58,7 +64,15 @@ defmodule Plug.Static do\n     at    = Keyword.fetch!(opts, :at)\n     from  = Keyword.fetch!(opts, :from)\n     gzip  = Keyword.get(opts, :gzip, false)\n-    cache = Keyword.get(opts, :cache, true)\n+    cache = Keyword.get(opts, :cache_control_for_query_strings)\n+\n+    # TODO Remove in 1.0\n+    if Keyword.has_key?(opts, :cache) do","path":"lib/plug/static.ex","position":58,"original_position":58,"commit_id":"2c5fbc51092942f1c4887f70b2739c4bf3114af2","original_commit_id":"2c5fbc51092942f1c4887f70b2739c4bf3114af2","user":{"login":"josevalim","id":9582,"avatar_url":"https://avatars.githubusercontent.com/u/9582?v=3","gravatar_id":"","url":"https://api.github.com/users/josevalim","html_url":"https://github.com/josevalim","followers_url":"https://api.github.com/users/josevalim/followers","following_url":"https://api.github.com/users/josevalim/following{/other_user}","gists_url":"https://api.github.com/users/josevalim/gists{/gist_id}","starred_url":"https://api.github.com/users/josevalim/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/josevalim/subscriptions","organizations_url":"https://api.github.com/users/josevalim/orgs","repos_url":"https://api.github.com/users/josevalim/repos","events_url":"https://api.github.com/users/josevalim/events{/privacy}","received_events_url":"https://api.github.com/users/josevalim/received_events","type":"User","site_admin":false},"body":"Nah, we don't need deprecations. Just remove it and we will add an entry to the changelog.","created_at":"2015-01-04T19:15:00Z","updated_at":"2015-01-04T19:15:00Z","html_url":"https://github.com/elixir-lang/plug/pull/162#discussion_r22441643","pull_request_url":"https://api.github.com/repos/elixir-lang/plug/pulls/162","_links":{"self":{"href":"https://api.github.com/repos/elixir-lang/plug/pulls/comments/22441643"},"html":{"href":"https://github.com/elixir-lang/plug/pull/162#discussion_r22441643"},"pull_request":{"href":"https://api.github.com/repos/elixir-lang/plug/pulls/162"}}},"pull_request":{"url":"https://api.github.com/repos/elixir-lang/plug/pulls/162","id":26797995,"html_url":"https://github.com/elixir-lang/plug/pull/162","diff_url":"https://github.com/elixir-lang/plug/pull/162.diff","patch_url":"https://github.com/elixir-lang/plug/pull/162.patch","issue_url":"https://api.github.com/repos/elixir-lang/plug/issues/162","number":162,"state":"open","locked":false,"title":"Cache management (with ETag header) in Plug.Static","user":{"login":"whatyouhide","id":3890250,"avatar_url":"https://avatars.githubusercontent.com/u/3890250?v=3","gravatar_id":"","url":"https://api.github.com/users/whatyouhide","html_url":"https://github.com/whatyouhide","followers_url":"https://api.github.com/users/whatyouhide/followers","following_url":"https://api.github.com/users/whatyouhide/following{/other_user}","gists_url":"https://api.github.com/users/whatyouhide/gists{/gist_id}","starred_url":"https://api.github.com/users/whatyouhide/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/whatyouhide/subscriptions","organizations_url":"https://api.github.com/users/whatyouhide/orgs","repos_url":"https://api.github.com/users/whatyouhide/repos","events_url":"https://api.github.com/users/whatyouhide/events{/privacy}","received_events_url":"https://api.github.com/users/whatyouhide/received_events","type":"User","site_admin":false},"body":"Implementation of #160.\r\n\r\nThe second (1fdd90b) and fourth (2c5fbc5) commits of this PR can be completely nuked from the history if necessary:\r\n\r\n* 1fdd90b adds `@spec`s to all the function and replaces `binary` types with `String.t` and `Path.t`\r\n*  2c5fbc5 deprecates the `:cache` option in favour of `:cache_control_for_query_strings` (it just outputs a warning to `:stderr`). I'm not sure if this is the desired behaviour or if @josevalim meant to use both the options at the same time. Just let me know!\r\n\r\n**PS** I took advantage of this PR and of the fact that I was messing with `Plug.Static` to refactor it a bit (161c050), I can revert the changes anytime :).","created_at":"2015-01-04T18:39:22Z","updated_at":"2015-01-04T19:15:00Z","closed_at":null,"merged_at":null,"merge_commit_sha":"f400588bc3f665dd866cfab45b06565d0472157f","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/elixir-lang/plug/pulls/162/commits","review_comments_url":"https://api.github.com/repos/elixir-lang/plug/pulls/162/comments","review_comment_url":"https://api.github.com/repos/elixir-lang/plug/pulls/comments/{number}","comments_url":"https://api.github.com/repos/elixir-lang/plug/issues/162/comments","statuses_url":"https://api.github.com/repos/elixir-lang/plug/statuses/2c5fbc51092942f1c4887f70b2739c4bf3114af2","head":{"label":"whatyouhide:cache-in-plug-static","ref":"cache-in-plug-static","sha":"2c5fbc51092942f1c4887f70b2739c4bf3114af2","user":{"login":"whatyouhide","id":3890250,"avatar_url":"https://avatars.githubusercontent.com/u/3890250?v=3","gravatar_id":"","url":"https://api.github.com/users/whatyouhide","html_url":"https://github.com/whatyouhide","followers_url":"https://api.github.com/users/whatyouhide/followers","following_url":"https://api.github.com/users/whatyouhide/following{/other_user}","gists_url":"https://api.github.com/users/whatyouhide/gists{/gist_id}","starred_url":"https://api.github.com/users/whatyouhide/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/whatyouhide/subscriptions","organizations_url":"https://api.github.com/users/whatyouhide/orgs","repos_url":"https://api.github.com/users/whatyouhide/repos","events_url":"https://api.github.com/users/whatyouhide/events{/privacy}","received_events_url":"https://api.github.com/users/whatyouhide/received_events","type":"User","site_admin":false},"repo":{"id":27427607,"name":"plug","full_name":"whatyouhide/plug","owner":{"login":"whatyouhide","id":3890250,"avatar_url":"https://avatars.githubusercontent.com/u/3890250?v=3","gravatar_id":"","url":"https://api.github.com/users/whatyouhide","html_url":"https://github.com/whatyouhide","followers_url":"https://api.github.com/users/whatyouhide/followers","following_url":"https://api.github.com/users/whatyouhide/following{/other_user}","gists_url":"https://api.github.com/users/whatyouhide/gists{/gist_id}","starred_url":"https://api.github.com/users/whatyouhide/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/whatyouhide/subscriptions","organizations_url":"https://api.github.com/users/whatyouhide/orgs","repos_url":"https://api.github.com/users/whatyouhide/repos","events_url":"https://api.github.com/users/whatyouhide/events{/privacy}","received_events_url":"https://api.github.com/users/whatyouhide/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/whatyouhide/plug","description":"A specification and conveniences for composable modules in between web applications","fork":true,"url":"https://api.github.com/repos/whatyouhide/plug","forks_url":"https://api.github.com/repos/whatyouhide/plug/forks","keys_url":"https://api.github.com/repos/whatyouhide/plug/keys{/key_id}","collaborators_url":"https://api.github.com/repos/whatyouhide/plug/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/whatyouhide/plug/teams","hooks_url":"https://api.github.com/repos/whatyouhide/plug/hooks","issue_events_url":"https://api.github.com/repos/whatyouhide/plug/issues/events{/number}","events_url":"https://api.github.com/repos/whatyouhide/plug/events","assignees_url":"https://api.github.com/repos/whatyouhide/plug/assignees{/user}","branches_url":"https://api.github.com/repos/whatyouhide/plug/branches{/branch}","tags_url":"https://api.github.com/repos/whatyouhide/plug/tags","blobs_url":"https://api.github.com/repos/whatyouhide/plug/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/whatyouhide/plug/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/whatyouhide/plug/git/refs{/sha}","trees_url":"https://api.github.com/repos/whatyouhide/plug/git/trees{/sha}","statuses_url":"https://api.github.com/repos/whatyouhide/plug/statuses/{sha}","languages_url":"https://api.github.com/repos/whatyouhide/plug/languages","stargazers_url":"https://api.github.com/repos/whatyouhide/plug/stargazers","contributors_url":"https://api.github.com/repos/whatyouhide/plug/contributors","subscribers_url":"https://api.github.com/repos/whatyouhide/plug/subscribers","subscription_url":"https://api.github.com/repos/whatyouhide/plug/subscription","commits_url":"https://api.github.com/repos/whatyouhide/plug/commits{/sha}","git_commits_url":"https://api.github.com/repos/whatyouhide/plug/git/commits{/sha}","comments_url":"https://api.github.com/repos/whatyouhide/plug/comments{/number}","issue_comment_url":"https://api.github.com/repos/whatyouhide/plug/issues/comments/{number}","contents_url":"https://api.github.com/repos/whatyouhide/plug/contents/{+path}","compare_url":"https://api.github.com/repos/whatyouhide/plug/compare/{base}...{head}","merges_url":"https://api.github.com/repos/whatyouhide/plug/merges","archive_url":"https://api.github.com/repos/whatyouhide/plug/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/whatyouhide/plug/downloads","issues_url":"https://api.github.com/repos/whatyouhide/plug/issues{/number}","pulls_url":"https://api.github.com/repos/whatyouhide/plug/pulls{/number}","milestones_url":"https://api.github.com/repos/whatyouhide/plug/milestones{/number}","notifications_url":"https://api.github.com/repos/whatyouhide/plug/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/whatyouhide/plug/labels{/name}","releases_url":"https://api.github.com/repos/whatyouhide/plug/releases{/id}","created_at":"2014-12-02T10:36:17Z","updated_at":"2014-12-12T15:28:11Z","pushed_at":"2015-01-04T18:36:57Z","git_url":"git://github.com/whatyouhide/plug.git","ssh_url":"git@github.com:whatyouhide/plug.git","clone_url":"https://github.com/whatyouhide/plug.git","svn_url":"https://github.com/whatyouhide/plug","homepage":null,"size":943,"stargazers_count":0,"watchers_count":0,"language":"Elixir","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":"master"}},"base":{"label":"elixir-lang:master","ref":"master","sha":"bbfe321a79668a8fa085fd4ff256319d4fc490a9","user":{"login":"elixir-lang","id":1481354,"avatar_url":"https://avatars.githubusercontent.com/u/1481354?v=3","gravatar_id":"","url":"https://api.github.com/users/elixir-lang","html_url":"https://github.com/elixir-lang","followers_url":"https://api.github.com/users/elixir-lang/followers","following_url":"https://api.github.com/users/elixir-lang/following{/other_user}","gists_url":"https://api.github.com/users/elixir-lang/gists{/gist_id}","starred_url":"https://api.github.com/users/elixir-lang/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/elixir-lang/subscriptions","organizations_url":"https://api.github.com/users/elixir-lang/orgs","repos_url":"https://api.github.com/users/elixir-lang/repos","events_url":"https://api.github.com/users/elixir-lang/events{/privacy}","received_events_url":"https://api.github.com/users/elixir-lang/received_events","type":"Organization","site_admin":false},"repo":{"id":14421569,"name":"plug","full_name":"elixir-lang/plug","owner":{"login":"elixir-lang","id":1481354,"avatar_url":"https://avatars.githubusercontent.com/u/1481354?v=3","gravatar_id":"","url":"https://api.github.com/users/elixir-lang","html_url":"https://github.com/elixir-lang","followers_url":"https://api.github.com/users/elixir-lang/followers","following_url":"https://api.github.com/users/elixir-lang/following{/other_user}","gists_url":"https://api.github.com/users/elixir-lang/gists{/gist_id}","starred_url":"https://api.github.com/users/elixir-lang/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/elixir-lang/subscriptions","organizations_url":"https://api.github.com/users/elixir-lang/orgs","repos_url":"https://api.github.com/users/elixir-lang/repos","events_url":"https://api.github.com/users/elixir-lang/events{/privacy}","received_events_url":"https://api.github.com/users/elixir-lang/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/elixir-lang/plug","description":"A specification and conveniences for composable modules in between web applications","fork":false,"url":"https://api.github.com/repos/elixir-lang/plug","forks_url":"https://api.github.com/repos/elixir-lang/plug/forks","keys_url":"https://api.github.com/repos/elixir-lang/plug/keys{/key_id}","collaborators_url":"https://api.github.com/repos/elixir-lang/plug/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/elixir-lang/plug/teams","hooks_url":"https://api.github.com/repos/elixir-lang/plug/hooks","issue_events_url":"https://api.github.com/repos/elixir-lang/plug/issues/events{/number}","events_url":"https://api.github.com/repos/elixir-lang/plug/events","assignees_url":"https://api.github.com/repos/elixir-lang/plug/assignees{/user}","branches_url":"https://api.github.com/repos/elixir-lang/plug/branches{/branch}","tags_url":"https://api.github.com/repos/elixir-lang/plug/tags","blobs_url":"https://api.github.com/repos/elixir-lang/plug/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/elixir-lang/plug/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/elixir-lang/plug/git/refs{/sha}","trees_url":"https://api.github.com/repos/elixir-lang/plug/git/trees{/sha}","statuses_url":"https://api.github.com/repos/elixir-lang/plug/statuses/{sha}","languages_url":"https://api.github.com/repos/elixir-lang/plug/languages","stargazers_url":"https://api.github.com/repos/elixir-lang/plug/stargazers","contributors_url":"https://api.github.com/repos/elixir-lang/plug/contributors","subscribers_url":"https://api.github.com/repos/elixir-lang/plug/subscribers","subscription_url":"https://api.github.com/repos/elixir-lang/plug/subscription","commits_url":"https://api.github.com/repos/elixir-lang/plug/commits{/sha}","git_commits_url":"https://api.github.com/repos/elixir-lang/plug/git/commits{/sha}","comments_url":"https://api.github.com/repos/elixir-lang/plug/comments{/number}","issue_comment_url":"https://api.github.com/repos/elixir-lang/plug/issues/comments/{number}","contents_url":"https://api.github.com/repos/elixir-lang/plug/contents/{+path}","compare_url":"https://api.github.com/repos/elixir-lang/plug/compare/{base}...{head}","merges_url":"https://api.github.com/repos/elixir-lang/plug/merges","archive_url":"https://api.github.com/repos/elixir-lang/plug/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/elixir-lang/plug/downloads","issues_url":"https://api.github.com/repos/elixir-lang/plug/issues{/number}","pulls_url":"https://api.github.com/repos/elixir-lang/plug/pulls{/number}","milestones_url":"https://api.github.com/repos/elixir-lang/plug/milestones{/number}","notifications_url":"https://api.github.com/repos/elixir-lang/plug/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/elixir-lang/plug/labels{/name}","releases_url":"https://api.github.com/repos/elixir-lang/plug/releases{/id}","created_at":"2013-11-15T10:30:47Z","updated_at":"2015-01-04T17:03:44Z","pushed_at":"2015-01-02T22:25:22Z","git_url":"git://github.com/elixir-lang/plug.git","ssh_url":"git@github.com:elixir-lang/plug.git","clone_url":"https://github.com/elixir-lang/plug.git","svn_url":"https://github.com/elixir-lang/plug","homepage":null,"size":2107,"stargazers_count":213,"watchers_count":213,"language":"Elixir","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":59,"mirror_url":null,"open_issues_count":6,"forks":59,"open_issues":6,"watchers":213,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/elixir-lang/plug/pulls/162"},"html":{"href":"https://github.com/elixir-lang/plug/pull/162"},"issue":{"href":"https://api.github.com/repos/elixir-lang/plug/issues/162"},"comments":{"href":"https://api.github.com/repos/elixir-lang/plug/issues/162/comments"},"review_comments":{"href":"https://api.github.com/repos/elixir-lang/plug/pulls/162/comments"},"review_comment":{"href":"https://api.github.com/repos/elixir-lang/plug/pulls/comments/{number}"},"commits":{"href":"https://api.github.com/repos/elixir-lang/plug/pulls/162/commits"},"statuses":{"href":"https://api.github.com/repos/elixir-lang/plug/statuses/2c5fbc51092942f1c4887f70b2739c4bf3114af2"}}}}