silverstripe-asset-admin icon indicating copy to clipboard operation
silverstripe-asset-admin copied to clipboard

Use caching instead of polling in HistoryList

Open sabina-talipova opened this issue 1 year ago • 0 comments

Description

To determine if the history list requires a refresh we send request every 250 ms in refreshHistoryIfNeeded.

This needs a delay/throttle, so this api request tries to be made last in the stack. We also use this to stop an API call happening if the component is going to unmount soon.

This could potentially be solved by using apollo-client's caching and graphql. See: https://github.com/silverstripe/silverstripe-asset-admin/blob/02728e1adcf5c912b3ab0d8dc64963a717139d0f/client/src/containers/HistoryList/HistoryList.js#L78

sabina-talipova avatar Oct 17 '23 20:10 sabina-talipova