Right now i am working in development environment. i am using vs code. I have executed the application.
i have done some modification on model and then i tried to retrieve it using api . i am not getting the latest data.
I have to stop and start the application to get the latest data. Why?
How to get to latest data without restarting the application ? Looks like we have data sync issue.
here i changed only data on my model. even i didnot change the structure. what is the issue with strapi?
Hi team ,
please update me regarding this,
@DMehaffy,@SorinGFS,@sunnyson : please update me regarding this.
really data sync issue is affecting the development. please help me
We need more information, as I don’t understand what you are referring to here. Can you provide some examples?
Please provide more information.
Code example that you use(code or screenshot) + the result you get + the expected result.
In Strapi application ,(http://localhost:1337/admin/plugins/content-manager/collectionType/application::lists.lists)
I have modified some records in Lists collection Type and then i have saved it.
i called getlist api (http://localhost:1337/list) , its returning the old data.
if i restart the strapi application , its working fine.
Is it clear now?
Do you use some sort of cache? Like redis? Seems that your requests are cached and cache is cleaned when you restart strapi
Sorry i didnot use redis. i have a plan to use it .
Now data is not getting sync immediately. Why are we getting old data from APIs?
It is always synced immediately. There is no way to return old data as the data is returned directly from DB.
its not happening. Please do the following
1-create strapi application and execute NPM RUN STRAPI DEVELOP
2-Create a content type(list)
3-Retrieve a content type in another browser or in postman ((http://localhost:1337/list)
4-Now go to List (http://localhost:1337/admin/plugins/content-manager/collectionType/application::lists.lists)
Modify some records
5-again Retrieve a content type in another browser or in postman ((http://localhost:1337/list)
you will get old data.
please help me.
Note : i am using sqlite (default option) only. please check it.
Just checked on SQLite. In my case still returns new data.
please share the implementation. i will compare it. thanks!
We are planning to use redis cache also. is it good to proceed with redis cache?
because we are facing data sync issue… please advice … how to get the latest data… ?
I didn’t make any “implementation”, I just created the default strapi project with a CollectionType called Test added some data to it, fetched that data from the
/test API. After that I modified some data inside Test collection and fetched the data again from
/test - so I received updated data without making any restarts to the Strapi.
thanks for your information. did you try with development?
We need information about your environment, your project. Where are you hosting, what database type, have you made any major customizations.
Your only providing half the puzzle in a very abstract way and hoping that we can solve it while missing most of the pieces. I can’t advise you on solutions until I have the exact steps required to reproduce the issue locally in my own machine.
Can you provide your project code, a sample project that you have reproduce the issue with, or the steps required to reproduce.