Merge pull request #14571 from strapi/feature/relations-main-view-relation-cache

This commit is contained in:
Josh 2022-10-10 08:55:02 +01:00 committed by GitHub
commit 9cef84c486
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -38,6 +38,7 @@ export const useRelation = (cacheKey, { relation, search }) => {
};
const relationsRes = useInfiniteQuery(['relation', cacheKey], fetchRelations, {
cacheTime: 0,
enabled: relation.enabled,
getNextPageParam(lastPage) {
// the API may send an empty 204 response