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

Turbo.visit cache support #1090

Open
pySilver opened this issue Nov 30, 2023 · 3 comments
Open

Turbo.visit cache support #1090

pySilver opened this issue Nov 30, 2023 · 3 comments

Comments

@pySilver
Copy link

I'm unsure if that is the right place to ask, but does Turbo.visit API has cache support? I'm building multi-level navigation for my site where accessing sub-menu triggers turbo frame requests. The problem is that navigating the same navigation sections is not immediate as it requests my backend repeatedly. That results in poor UX where user can hardly navigate through menu.

Ideally, I'd love to preload my navigation so users will not have to wait for it once they need it.

@brunoprietog
Copy link
Collaborator

Yes, Turbo.visit caches the response. Maybe data-turbo-preload can cover your case?

@pySilver
Copy link
Author

pySilver commented Dec 4, 2023

@brunoprietog hm. Something isn't right then. If cache is supported within frames, I'd expect to see immediate response when user clicks the same "expand submenu" over and over again. But instead I see slow request and no content changes within target frame up until response is received. Maybe it is not supported for frames navigation and only does full page cache?

@pySilver
Copy link
Author

pySilver commented Dec 4, 2023

Related issue: #857

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

2 participants