简体   繁体   English

调用 cubeJs 后端 API 时,Cube JS 不获取新记录

[英]Cube JS doesn't fetch new records when cubeJs backend API is called

I have connected my local Database wrote schemas to fetch data and generate visualizations.我已连接本地数据库写入模式以获取数据并生成可视化效果。

But I observed that the data is not being fetched every time I hit cube.js backend.但我观察到每次我点击 cube.js 后端时都不会获取数据。 It is not being updated.它没有被更新。 I have to restart the server every time to get the updated data.我每次都必须重新启动服务器才能获取更新的数据。 Which I feel is very inefficient and not usable in real-world applications.我觉得这是非常低效的,在实际应用中不可用。

Need help to make cube.js fetch the records from the database whenever an API call is made.需要帮助使 cube.js 在每次调用 API 时从数据库中获取记录。

Thanks for the help in advance.我在这里先向您的帮助表示感谢。

Okay so this was happing because of in-memory cache which is on by default in cube.js.好的,这是因为 cube.js 中默认启用的内存缓存。

reference https://cube.dev/docs/caching参考https://cube.dev/docs/caching

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM