Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add an option to the API to ignore/refresh the file cache #40

Open
apdavison opened this issue Jun 22, 2021 · 1 comment
Open

Add an option to the API to ignore/refresh the file cache #40

apdavison opened this issue Jun 22, 2021 · 1 comment
Labels
enhancement New feature or request

Comments

@apdavison
Copy link
Member

for example, suppose the file at a given URL is exchanged for another with the same name

@appukuttan-shailesh
Copy link
Collaborator

This would be a handy feature. But it will still require web pages (making use of neo viewer) to be kept track of and updated (with this option) when a particular file is changed. At the time of creating the webpage, authors might not anticipate changes and would prefer to make use of the caching feature for performance reasons. And eventually they are likely to forget the caching aspect. It might be useful to consider caching to be disabled as default, or have some minimal checks such as if the file size has changed (via HTTP HEAD method; not foolproof but some basic check) .

As example, for the file located at:
https://object.cscs.ch/v1/AUTH_c0a333ecf7c045809321ce9d9ecdfdea/EBRAINS_live_papers/2018_migliore_et_al/exp_data/abf-int-bAC/Ivy_960711AHP3/96711008.abf

HEAD retrieves the following info:
image

I believe we can make use of "Content-Length" and "Last-Modified" to compare if the cached file is same as the file currently at the target URL, as some basic check (which should probably suffice for our purposes).

@apdavison apdavison added the enhancement New feature or request label Aug 28, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants