Skip to content

Memoize manifest digest outside local environments - #57

Merged
skryukov merged 2 commits into
skryukov:mainfrom
thomasklemm:memoize-manifest-digest
Nov 12, 2026
Merged

skryukov merged 2 commits into
skryukov:mainfrom
thomasklemm:memoize-manifest-digest

Conversation

@thomasklemm

@thomasklemm thomasklemm commented Oct 20, 2026 •

Copy link
Copy Markdown
Contributor

Outside local environments (Rails.env.local?), the manifest digest is now memoized, as Manifest#data already is; in development and test it is still recomputed. A missing manifest still returns "no-manifest" and is not cached, so a manifest built after boot is picked up. RailsVite.reset! still discards the manifest and its cached digest.

Tests cover non-local caching, local reloads, missing-manifest recovery, and reset invalidation; the caching tests fail on the current implementation.

bundle exec rake test: 180 runs, 361 assertions, 0 failures. bundle exec standardrb: clean.

Motivation and measurements: #56.

Match Manifest#data: compute the digest once outside Rails.env.local?
and keep recomputing in development/test. A missing manifest still
returns "no-manifest" and is not cached, so a manifest built after boot
is picked up. RailsVite.reset! discards the cached digest.

Amp-Thread-ID: https://ampcode.com/threads/T-01a155f6-872d-7318-81bf-9be64530289e
@skryukov
skryukov merged commit dbbc64a into skryukov:main Nov 12, 2026
7 checks passed
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