Closed forste closed 4 years ago
This happens because API requests are redirected to the browser cache instead of sent to the server, and therefore outdated data is returned and displayed
I've tried to disable the client cache in two different ways
I found a project on github with a similar issue https://github.com/jupyterhub/binderhub/issues/315
they resolved it, to change the server configuration to allow the client setting the cache-control header https://github.com/jupyterhub/binderhub/pull/641
looks promising!
GET /lots
is indeed affected.
Can you disable the cache somehow for GET /lots
?
I also found the cache for GET /devices
here https://github.com/eReuse/devicehub-teal/blob/a36cdfbfe7f73f21180435ace39863132b1c13cd/ereuse_devicehub/resources/device/views.py#L113
GET /devices
is also affected by this issue: after adding devices to a lot, sometimes devices are not shown because the GET /devices
request is directed to the cache, which returns obsolete data
Server branch hotfix/rm-cache
Tested this commit https://github.com/eReuse/devicehub-teal/commit/61fd9de4774e564c0cd466519bbccdc8506ae8b8 as follows
create new lot
same for editing a lot, and adding devices to a lot
So I mark this as closed & fixed by https://github.com/eReuse/devicehub-teal/commit/61fd9de4774e564c0cd466519bbccdc8506ae8b8
With browser cache active, as is the default case, UI is not updated after operations properly such as create new lot, change lot name, add devices to lot, initiate transfer, etc.
Environment Devicehub client - latest tested commit: https://github.com/eReuse/DeviceHubClient/commit/d704572fd2d59e437210cacf9e48d72c0009c01f Devicehub server - latest tested commit: https://github.com/eReuse/devicehub-teal/commit/dfb518068ddf6223c5d3245925fdeaa81ad49045