You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In the useLoader function in hooks.tsx, currently the URL is used as the key in order to cache the gltf using the suspend function from the suspend-react library. My problem is that I have a url with a changing saastoken, so each time I go to the page it will re-download and cache a new version of the file. Would it be possible to have an optional cache key that's different to the URL which it would check for and return instead? That way even if the url is different due to some form of api auth it would still return the cached glb when the function is called again. I've written a somewhat similar hook to useGLTF from the react-drei library that uses the same idea to cache the object:
In the
useLoader
function inhooks.tsx
, currently the URL is used as the key in order to cache the gltf using thesuspend
function from thesuspend-react
library. My problem is that I have a url with a changing saastoken, so each time I go to the page it will re-download and cache a new version of the file. Would it be possible to have an optional cache key that's different to the URL which it would check for and return instead? That way even if the url is different due to some form of api auth it would still return the cached glb when the function is called again. I've written a somewhat similar hook touseGLTF
from thereact-drei
library that uses the same idea to cache the object:The text was updated successfully, but these errors were encountered: