{"action":"created","issue":{"url":"https://api.github.com/repos/playframework/playframework/issues/6382","repository_url":"https://api.github.com/repos/playframework/playframework","labels_url":"https://api.github.com/repos/playframework/playframework/issues/6382/labels{/name}","comments_url":"https://api.github.com/repos/playframework/playframework/issues/6382/comments","events_url":"https://api.github.com/repos/playframework/playframework/issues/6382/events","html_url":"https://github.com/playframework/playframework/issues/6382","id":169265170,"number":6382,"title":"CacheBuilder is hard to use with ActionBuilder","user":{"login":"wsargent","id":71236,"avatar_url":"https://avatars.githubusercontent.com/u/71236?v=3","gravatar_id":"","url":"https://api.github.com/users/wsargent","html_url":"https://github.com/wsargent","followers_url":"https://api.github.com/users/wsargent/followers","following_url":"https://api.github.com/users/wsargent/following{/other_user}","gists_url":"https://api.github.com/users/wsargent/gists{/gist_id}","starred_url":"https://api.github.com/users/wsargent/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/wsargent/subscriptions","organizations_url":"https://api.github.com/users/wsargent/orgs","repos_url":"https://api.github.com/users/wsargent/repos","events_url":"https://api.github.com/users/wsargent/events{/privacy}","received_events_url":"https://api.github.com/users/wsargent/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":1,"created_at":"2016-08-04T00:30:29Z","updated_at":"2016-12-08T10:20:24Z","closed_at":null,"body":"### Play Version (2.5.x / etc)\n\nmaster\n### API (Scala / Java / Neither / Both)\n\nScala\n### Actual Behavior\n\n`play.api.cache.Cached` uses a CachedBuilder which generates an `EssentialAction` rather than an `Action`\n\nhttps://github.com/playframework/playframework/blob/master/framework/src/play-cache/src/main/scala/play/api/cache/Cached.scala#L118\n\nThis means that it's hard to use `Cached` in action composition, because `composeAction` takes an Action and not an EssentialAction:\n\nhttps://github.com/playframework/playframework/blob/master/framework/src/play/src/main/scala/play/api/mvc/Action.scala#L450\n\nIt's not clear what the advantage is in returning EssentialAction, and I think this can be changed without consequence.\n"},"comment":{"url":"https://api.github.com/repos/playframework/playframework/issues/comments/265705219","html_url":"https://github.com/playframework/playframework/issues/6382#issuecomment-265705219","issue_url":"https://api.github.com/repos/playframework/playframework/issues/6382","id":265705219,"user":{"login":"igorynia","id":1040637,"avatar_url":"https://avatars.githubusercontent.com/u/1040637?v=3","gravatar_id":"","url":"https://api.github.com/users/igorynia","html_url":"https://github.com/igorynia","followers_url":"https://api.github.com/users/igorynia/followers","following_url":"https://api.github.com/users/igorynia/following{/other_user}","gists_url":"https://api.github.com/users/igorynia/gists{/gist_id}","starred_url":"https://api.github.com/users/igorynia/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/igorynia/subscriptions","organizations_url":"https://api.github.com/users/igorynia/orgs","repos_url":"https://api.github.com/users/igorynia/repos","events_url":"https://api.github.com/users/igorynia/events{/privacy}","received_events_url":"https://api.github.com/users/igorynia/received_events","type":"User","site_admin":false},"created_at":"2016-12-08T10:20:24Z","updated_at":"2016-12-08T10:20:24Z","body":"As I can see, the main reason, why Cached class is working though EssentialAction, is that ActionFunction and Action's are working with BodyParsers, and EssentialActions aren't.\r\n - ActionFunction's are called after BodyParser is applied to the request, so there would be some performance penalty\r\n - Action validates incoming request, while EssentialAction is called after request headers are received and _before_ request body is received"}}
{"actor":{"display_login":"igorynia"}}