FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

Use cache-control private for fastly esi subrequest endpoint · devhttps/frontend@255287f · GitHub

Commit 255287f

Browse files
Richard Nguyen
committed
Use cache-control private for fastly esi subrequest endpoint
1 parent 0677efa commit 255287f

2 files changed

Lines changed: 6 additions & 2 deletions

File tree

‎common/app/model/Cached.scala‎

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -142,6 +142,10 @@ object Cached extends implicits.Dates {
142142
}
143143
}
144144

145+
object PrivateCache {
146+
def apply(result: Result): Result = result.withHeaders("Cache-Control" -> "private")
147+
}
148+
145149
object NoCache {
146150
def apply(result: Result): Result = result.withHeaders("Cache-Control" -> "no-cache", "Pragma" -> "no-cache")
147151
}

‎diagnostics/app/controllers/CommercialPreflightController.scala‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ package controllers
22

33
import conf.Configuration
44
import common.{ExecutionContexts, Logging}
5-
import model.NoCache
5+
import model.PrivateCache
66
import org.joda.time.DateTime
77
import play.api.libs.json.Json
88
import play.api.libs.ws.WSClient
@@ -79,6 +79,6 @@ class CommercialPreflightController(wsClient: WSClient) extends Controller with
7979
})
8080
}
8181

82-
NoCache(Ok(views.html.adCall(pageViewId)))
82+
PrivateCache(Ok(views.html.adCall(pageViewId)))
8383
}
8484
}

0 commit comments

Comments
 (0)

Back | FazBrowse Home | New Git URL