Is revalidatePath() overkill for mutating a single item in a large list?
Let’s imagine an application like Trello, where you can have a large number of cards on your board. You have the option to change the title of a card without opening it. To mutate the data, a server action is called, which triggers revalidatePath(), causing the Board component to re-render with the updated cards, since they are received as props.
The problem is that this triggers a query to fetch all the cards again—potentially 100 or more—even though you only changed the title of a single card.
What do you think about this? Is it sustainable in real-world applications with thousands of users?
Additionally, I’d like to understand why using revalidatePath() in a server action refreshes the page with the new data, if it’s supposed to only invalidate the cache for the next time the page is visited, according to the documentation.