Skip to content

only cache units and courses within running web application#71467

Merged
davidsbailey merged 3 commits intostagingfrom
simplify-unit-should-cache
Mar 19, 2026
Merged

only cache units and courses within running web application#71467
davidsbailey merged 3 commits intostagingfrom
simplify-unit-should-cache

Conversation

@davidsbailey
Copy link
Member

@davidsbailey davidsbailey commented Mar 18, 2026

the impetus for this change is that I determined that #71016 broke during seed on test and production because Unit.should_cache? is true when seeding in those environments. There's no reason for us to be caching at that time, so the solution is to disable caching when seeding.

Then I saw some issues with the logic in Unit.should_cache? and wanted to clean it up a bit further.

Done in this PR:

  • stop caching during seeding or any other rake tasks
  • start caching within the running web application in drone ui tests (this could speed up drone runs)
  • simplify by further limiting caching to only happen within the running web application
  • remove obsolete SKIP_SCRIPT_PRELOAD and bin/dashboard-console-skip-preload

Caveat: one possible controversial issue here is that we will no longer be caching within rails console. I've solicited input on whether this is an issue for anyone in slack.

Testing story

  • passing drone run gives good coverage for CI, in particular the ui test steps which now have caching enabled
  • problems in staging, development and levelbuilder are unlikely because caching was already disabled there
  • problems in unit tests are unlikely (in development or test) because caching was already disabled for unit tests

Deployment notes

  • after merging, I will notify the DOTD and keep a close eye on the next DTT and DTP (ci_build cronjob, deployment rake tasks, other cronjobs)

@davidsbailey davidsbailey merged commit 2e4cd95 into staging Mar 19, 2026
5 checks passed
@davidsbailey davidsbailey deleted the simplify-unit-should-cache branch March 19, 2026 17:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants