mirror of
https://github.com/jeffvli/feishin.git
synced 2026-05-07 04:20:12 +02:00
Set 1 minute cache time on manual query fetches
This commit is contained in:
@@ -85,16 +85,19 @@ export const PlaylistListContent = ({ tableRef }: PlaylistListContentProps) => {
|
||||
...page.filter,
|
||||
});
|
||||
|
||||
const playlistsRes = await queryClient.fetchQuery(queryKey, async ({ signal }) =>
|
||||
api.controller.getPlaylistList({
|
||||
query: {
|
||||
limit,
|
||||
startIndex,
|
||||
...page.filter,
|
||||
},
|
||||
server,
|
||||
signal,
|
||||
}),
|
||||
const playlistsRes = await queryClient.fetchQuery(
|
||||
queryKey,
|
||||
async ({ signal }) =>
|
||||
api.controller.getPlaylistList({
|
||||
query: {
|
||||
limit,
|
||||
startIndex,
|
||||
...page.filter,
|
||||
},
|
||||
server,
|
||||
signal,
|
||||
}),
|
||||
{ cacheTime: 1000 * 60 * 1 },
|
||||
);
|
||||
|
||||
const playlists = api.normalize.playlistList(playlistsRes, server);
|
||||
|
||||
Reference in New Issue
Block a user