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

Cached components may break after new styles deployed #1121

Closed
fofr opened this issue Aug 25, 2017 · 1 comment
Closed

Cached components may break after new styles deployed #1121

fofr opened this issue Aug 25, 2017 · 1 comment

Comments

@fofr
Copy link
Contributor

fofr commented Aug 25, 2017

We stumbled on this after #1117 and #1119 and had to implement fixes we later reverted in a follow up deploy like #1120.

If we modify both HTML and styles for a component in a deployment a quirk of caching means that the styling and markup can get out of sync. We saw this on govenrment-frontend.

It happens because:

  • an app caches calls to components, creating a cached version of the template
  • when a new static deploy is released we update the styles and the templates
  • when the page cache expires, a new page is returned with the updated static styling
  • BUT: the component may still be cached, so the new page ends up with new styling and old HTML
  • when that cache expires, eventually a new page with new component template and new styles is returned

For a PR like #1119, if we hadn't caught this then for a period of ~15 minutes any users hitting a page that was cached with new styles and old component templates wouldn't have correctly styled titles.

Screenshot of the problem with pagination:
screen_shot_2017-08-24_at_12 09 03

@tijmenb
Copy link
Contributor

tijmenb commented Nov 1, 2018

This has been solved by moving all components into the gem.

@tijmenb tijmenb closed this as completed Nov 1, 2018
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

No branches or pull requests

2 participants