-
Hi, i have a use case for which i'm not sure Pinia Colada is the solution. In my app, sometimes i need to call the same API multiple times with different parameters, in the same component. One example of that is a table showing users, and there's an API that retrieves the last login time per user, where the userId is the parameter for this API. If there's 10 users showing in the table, i need 10 API calls to display the last login time in a column of the table. Is that something i can achieve with Pinia Colada ? From the documentation, it seems i can't really do that, however i would be interested to do that, so it would handle the cache automatically. At the moment i store the data myself, but whenever the list of users is refreshed, i call the API again for all the entries. If somehow i could use Pinia Colada for that, i could leverage its cache management. |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
Yes, you can: https://pinia-colada.esm.dev/guide/query-keys.html#Dynamic-typed-keys |
Beta Was this translation helpful? Give feedback.
Yes, you can: https://pinia-colada.esm.dev/guide/query-keys.html#Dynamic-typed-keys