Cache JS, not homepage
This commit is contained in:
parent
06cf2e1120
commit
2d116a2a4f
|
@ -83,7 +83,8 @@ trait LilaController
|
|||
|
||||
protected def JsonIOk(map: IO[Map[String, Any]]) = JsonOk(map.unsafePerformIO)
|
||||
|
||||
protected def JsIOk(js: IO[String], headers: (String, String)*) = JsOk(js.unsafePerformIO)
|
||||
protected def JsIOk(js: IO[String], headers: (String, String)*) =
|
||||
JsOk(js.unsafePerformIO, headers: _*)
|
||||
|
||||
protected def JsOk(js: String, headers: (String, String)*) =
|
||||
Ok(js) as JAVASCRIPT withHeaders (headers: _*)
|
||||
|
|
|
@ -24,7 +24,14 @@ object Lobby extends LilaController with Results {
|
|||
private def openTours = env.tournament.repo.created
|
||||
private def teamCache = env.team.cached
|
||||
|
||||
val home = Open { implicit ctx ⇒ Async { renderHome(none, Ok) } }
|
||||
val home = Open { implicit ctx ⇒
|
||||
Async {
|
||||
renderHome(none, Ok).map(_.withHeaders(
|
||||
CACHE_CONTROL -> "no-cache",
|
||||
PRAGMA -> "no-cache"
|
||||
))
|
||||
}
|
||||
}
|
||||
|
||||
def handleNotFound(req: RequestHeader): Result = handleNotFound(reqToCtx(req))
|
||||
|
||||
|
|
Loading…
Reference in a new issue