Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Set printable crossword cache time to 60 secs #26688

Merged
merged 2 commits into from
Nov 15, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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(3.days)(
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
Loading