I have made some changes to our API some months ago (adding a new JSON property), that is connected to integration fields. I see that the catalog is still holding onto the old data, despite thousands of successful syncs. I'm guessing its cached based on updated date.
Is there a way to force a refresh of the catalog, or to clear out the existing catalog and resync it? I see no mention of this in the documentation.
Hello @matt2, thanks for reaching out.
There are 2 different connectors for Custom APIs. One that automatically syncs every 30 minutes and the one that uses the write API. For Shopify, there is only one, and it syncs about every 30 minutes or so.
OK. Thats good to know, I had forgotten about that. Push vs pull. I'm currently using the automatically syncing one (pull) that is set up in the repo setting. It's mostly working fine, and hands off is nice.
Am I correct in the caching behavior—based on updated at timestamp?
Are their behaviors different in regards to caching/cache invalidation?
I need a way to clear out the old data and make sure the integration fields have the latest JSON serializer data whenever I make a change. Ideally I'd be able to do a force rewrite through a button in the settings where it would overwrite the cached values with whatever the api returns.
I'm not seeing an error raised, When I fetch an document, I'm seeing the slice that uses the integration fields data is from an old outdated serializer.
On the first result > data > body > first slice > primary > fishing_report, you will not find a technique property (the newly added one). However, the API that the integration field is using returns it in the blob.
If you're saying there is no caching done by the latest_update in the API, then something else is responsible. Do documents hold onto their integration field data from the time they were published? I need to understand how we will manage changes over time.
I changed the latest_update in the api to yesterday. The JSON shows an updated serialized model, but the fetched prismic document slice data still shows the old JSON.
I also added a change to the document and republished it. The slice data is still showing the old JSON.
So that makes me think caching by latest_update is not happening, and it's not cached at publication time.
How is this supposed to work?
I can't imagine it's meant to do this, data like product pricing would need to be updated frequently to be meaningful.
The changes in your Custom Integration should appear immediately after you change the JSON. If possible, can you show us any visual examples of this error or a screen recording?