Cypress automatic cache retention versus manual cache clearing for CSS-only changes
0 reputation · 03 Jun 2021, 16:37 UTC
Determine whether to rely on Cypress's automatic cache retention or to manually clear the cache when only CSS or import files change, in order to avoid stale screenshots while preserving fast test feedback.
Constraints include the speed benefit of retaining cached command snapshots versus the risk of showing outdated results; clearing the cache removes saved debugging artifacts and increases test execution time. The unresolved behavior is whether Cypress should automatically clear the cache on every cypress run when a package.json dependency changes, a decision currently left to the user.
Should Cypress automatically clear the cache when a dependency in package.json changes? What are the trade‑offs between enabling automatic cache clearing on every run versus relying on manual cache clearing? How does each approach affect test feedback speed and debugging capability in CI pipelines?