Reloading for changing HSDS data #1553
Replies: 2 comments 4 replies
-
Excellent question! The current caching strategy is definitely limited... The long-term plan is to have at least an LRU cache of sorts to avoid growing the cache indefinitely (or the ability for the consumer application to provide its own caching data structure). Adding a refresh button somewhere to force a refetch of the current dataset is not out of the question, but I do think it'd be a bit of a shame, since it moves the responsibility of knowing when a dataset is stale to the end user. One thing that's actually very easy to do currently is clearing the entire cache. To do so, all you need is to pass a This is a React feature: because the fetching cache is part of the internal state of <HsdsProvider
key={<file-hash>} // or an incrementing number (as long as you know when to increment it)
url={...}
username={...}
password={...}
filepath={...}
>
<App />
</HsdsProvider> A couple of notes for clarity:
Let me know if this works and matches your need! |
Beta Was this translation helpful? Give feedback.
-
Seems I was wrong about this, sorry! 😢 I've just opened #1673 which offers an alternative in the form of a |
Beta Was this translation helpful? Give feedback.
-
h5web is a really neat interface explore h5 structured files. With the support of hsds, a visualized file may change while it is viewed.
Is there any way to allow the web interface to refresh the data from the hsds server. Either regularly, or with an update button?
Probably there needs to be an assumption that the structure does not change but only the data. I realized that the webinterface only queries the backend for new datasets, but caches already viewed ones, so switching back to an already viewed one does not reload from the backend.
Is such a reload feature on the horizon or out of scope for this project?
Beta Was this translation helpful? Give feedback.
All reactions