Skip to content

Bug: Turbo.visit Render sequence race condition for Cache and Request #447

@tleish

Description

@tleish

I came across what I believe to be a bug.

  1. Visit page (saves to turbo cache)
  2. Leave page
  3. Return to same turbo-cached page via server 302 redirect
  4. Quick flash of new network request content, but then replaced by old cached version.

Fetch requests show updated content in network request.

A few additional observations:

  • Render via direct GET request (no redirect) of cached page works as expected
  • Render via POST|PUT|DELETE and 302 redirect works as expected
  • Render via GET and 302 redirect DOES NOT work as expected

Adding to the landing page page temporarily resolves the issue, but unless I'm misunderstanding turbo caching, adding to every page with a redirect is not permanent solution.

Small demo app to reproduce the error:
GitHub - tleish/turbo-cache-test

  • Turbo 7.0.1 and v7.1.0-rc.1
  • Rails 6.1.4.1
  • Chrome Latest
  • Firefox Latest
  • Safari Latests

Bug also reported in this MR (#445 (comment))

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions