Fixes #37481 - Update cached value for manifest expiration date during import #10999
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Our stored manifest expiration date relies on a Rails cached value which is held for 1 minute:
This means that after a manifest import / refresh, the manifest expiration date may be inaccurate until the cache expiration time (1 minute). Because of this you must refresh the browser page to see the new manifest expiration date.
What are the changes introduced in this pull request?
manifest_expiration_date(cached: false)
is enough to prevent stale data from making it to the user's screen.Considerations taken when implementing this change?
What are the testing steps for this pull request?
Delete and reimport a manifest. Visit the Manage Manifest modal.
Before:
You'll see a manifest expiration date of the Unix epoch (31 Dec 1969 or 01 Jan 1970)
After:
You'll see the correct manifest expiration date