FgForrest / evitaDB

evitaDB is a specialized database with an easy-to-use API for e-commerce systems. It is a low-latency NoSQL in-memory engine that handles all the complex tasks that e-commerce systems have to deal with on a daily basis. evitaDB is expected to act as a fast secondary lookup/search index used by front stores.
https://evitadb.io
Other
62 stars 7 forks source link

Preconfigured connection in embedded evitaLab are sometimes not loaded #737

Closed lukashornych closed 1 week ago

lukashornych commented 1 week ago

Preconfigured connections are passed to embedded evitaLab through cookies. After last update that should have fixed an issue with cookies not being overwritten correctly, loading evitaLab with old data, the current solution seems to have opposite problem. Sometimes data are not present at all.

It happens during first load of new browser tab. After page reload, data are loaded correctly.

lukashornych commented 1 week ago

The solution I settled at is to pass the data (server name, pre. connections, ...) to evitaLab through URL query params through redirect. This seems to be working quite well and it should hopefully solved both problems (old data and no data).

Support in evitaLab for this is implemented in https://github.com/lukashornych/evitalab/issues/227

lukashornych commented 1 week ago

There seems to be issues in some browsers (Firefox only?) where when navigated link to evitaLab with demo snippet from evitaDB documentation site, it doesn't do a reload so data are not passed. Maybe it has something to do with caches? But subsequent refresh of that page does the server reload correctly.

Maybe we need to send something like

Cache-Control: no-store, no-cache, must-revalidate
lukashornych commented 1 week ago

Caching on Index.html is now disabled to always refresh evitaLab data. Assets use immutable caching for long time now as they are versioned in new evitaLab version.