Problem definition
With current implementation, cache is essential part of the process using Suspense API, because we need to save data in memory (for example, in useRef) to return it after Suspense has been resolved from hook useQuery. However, the problem may arise when there are a lot of requests cached. We need to clear resources.
SOLUTION
Define the cache limit - the maximum number of records saved for particular useQuery call. Each useQuery call must have at least cache limit = 1 to work properly.
Problem definition
With current implementation, cache is essential part of the process using
SuspenseAPI, because we need to save data in memory (for example, inuseRef) to return it afterSuspensehas been resolved from hookuseQuery. However, the problem may arise when there are a lot of requests cached. We need to clear resources.SOLUTION
Define the
cache limit- the maximum number of records saved for particularuseQuerycall. EachuseQuerycall must have at leastcache limit = 1to work properly.