Skip to content

Improve performance when going back to index from show #398

Answered by woylie
kuatroka asked this question in Q&A
Discussion options

You must be logged in to vote

That's more of a LiveView question than a Flop question. Flop does not have built-in caching capabilities. If index and show are in the same LiveView, the items should still be assigned to the socket when you patch back to index. You could check whether you already have items for the given parameters assigned to the socket in handle_params and only fetch them from the DB if necessary.

Replies: 2 comments

Comment options

You must be logged in to vote
0 replies
Answer selected by kuatroka
Comment options

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants