From f57dea29afaad81d4f77660fc2d7e6fa78a96c16 Mon Sep 17 00:00:00 2001 From: Andrew Nowak Date: Tue, 14 Nov 2023 20:53:17 +0000 Subject: [PATCH] make cache duration units explicit in crossword controller --- applications/app/controllers/CrosswordsController.scala | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/applications/app/controllers/CrosswordsController.scala b/applications/app/controllers/CrosswordsController.scala index 9c01529c3b7..b2561b234f3 100644 --- a/applications/app/controllers/CrosswordsController.scala +++ b/applications/app/controllers/CrosswordsController.scala @@ -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( @@ -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( @@ -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( @@ -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 {