Skip to content

Commit

Permalink
make cache duration units explicit in crossword controller
Browse files Browse the repository at this point in the history
  • Loading branch information
andrew-nowak committed Nov 14, 2023
1 parent 61bb024 commit f57dea2
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions applications/app/controllers/CrosswordsController.scala
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ trait CrosswordController extends BaseController with GuLogging with ImplicitCon
context: ApplicationContext,
): Future[Result] = {
withCrossword(crosswordType, id) { (crossword, content) =>
Cached(60)(
Cached(60.seconds)(
RevalidatableResult.Ok(
CrosswordHtmlPage.html(
CrosswordPageWithSvg(
Expand Down Expand Up @@ -87,7 +87,7 @@ class CrosswordPageController(val contentApiClient: ContentApiClient, val contro
def accessibleCrossword(crosswordType: String, id: Int): Action[AnyContent] =
Action.async { implicit request =>
withCrossword(crosswordType, id) { (crossword, content) =>
Cached(60)(
Cached(60.seconds)(
RevalidatableResult.Ok(
CrosswordHtmlPage.html(
AccessibleCrosswordPage(
Expand All @@ -107,7 +107,7 @@ class CrosswordPageController(val contentApiClient: ContentApiClient, val contro
def printableCrossword(crosswordType: String, id: Int): Action[AnyContent] =
Action.async { implicit request =>
withCrossword(crosswordType, id) { (crossword, content) =>
Cached(60)(
Cached(60.seconds)(
RevalidatableResult.Ok(
PrintableCrosswordHtmlPage.html(
CrosswordPageWithSvg(
Expand All @@ -127,7 +127,7 @@ class CrosswordPageController(val contentApiClient: ContentApiClient, val contro

val globalStylesheet = Static(s"stylesheets/$ContentCSSFile.css")

Cached(60) {
Cached(60.seconds) {
val body = s"""$xml"""
RevalidatableResult(
Cors {
Expand Down

0 comments on commit f57dea2

Please sign in to comment.