Closed fum-is-chum closed 6 months ago
@mr-donor Can you explain further about the invalidation cache problem more detail here? Because I did not encounter any cache invalidation problem, and actually no need to call the invalidate cache function
@mr-donor Can you explain further about the invalidation cache problem more detail here? Because I did not encounter any cache invalidation problem, and actually no need to call the invalidate cache function
Can you explain why no need to call the invalidate cache function?
I used the optimized SDK to test on the dapp last time, and it had the problem that the cache could not be updated after portfolio and coins updated. What I mean is that once we added caching to the sdk, we should help users handle the caching more accurately.
@mr-donor Can you explain further about the invalidation cache problem more detail here? Because I did not encounter any cache invalidation problem, and actually no need to call the invalidate cache function
Can you explain why no need to call the invalidate cache function?
I used the optimized SDK to test on the dapp last time, and it had the problem that the cache could not be updated after portfolio and coins updated. What I mean is that once we added caching to the sdk, we should help users handle the caching more accurately.
The reason is because the default staleTime
for DEFAULT_CACHE_OPTIONS is only 3s, so the cache will be marked as stale after 3s and the cache will be invalidated query will be refetched automatically on the next call.
Unless we set the staleTime
to a longer duration or Infinity
, then we need to manually call the cache invalidation function
txBlock
before inspecting to prevent duplicate calls ofgetProtocolConfig
getNormalizedMoveFunction
ScallopIndexer
API requests