Changes are not applied straight away

Hello Prismic

For some time now the data we are recovering has not been updating as quickly as before, we have deactivated the cache we have on our side and the problem persists, do you have any idea why we have this data lag?

I updated the text of the cta of this banner "cta_text" by adding the word "TEST" but the field is not updated in my response to the request on prismic...

Please find attached the problem I am facing. Thank you in advance

Hi Celine,

This FAQ should help you debug the issue:

Confirm what steps you've tried here, then if that doesn't work we can dig more into you project deployment setup.

Thanks.

It is not that we don't understand, we didn't change anything. on the implementation. Is it the new version slow down the update on prod ?

Hi @celine.hervouet,

We're trying to investigate an issue where some users have noticed a very small delay between the masterRef in the webhook payload of their repository and the one on their repository API, which caused outdated content being in the site.

This sounds like it could be a similar issue here - are you able to check or confirm whether this is what's happening to you as well? You're updating the content on your repository, and then it isn't appearing live on your website at the same speed as usual? Or is it that you are querying the latest ref directly, but the content is not the most recent?

Can you clarify your process for noticing the difference between your document and the API? I may have follow-up questions once this is cleared up!

Thank you for your help :slight_smile:

Hello, here to complete a bit. Yes we query the last reference and we can notice the difference between the data returned by the API and that recorded in the documents

Thank you in advance
Regards

Céline

Hello @celine.hervouet,

Thank you for the details! Here's a few follow-up questions from our team to better understand the situation. Every little bit helps understand our investigation :slight_smile:

  • Are you using the Prismic client SDK? If not, how are you querying our API?
  • Do you ever get any error codes at any point related to an outdated ref or anything else, or have you just noticed content updates are slower than usual?
  • You mentioned this has been happening for a little while, could you let us know when it first started?

Thank you again for your help!

Hey,
We are using like this: A 6-Minute Introduction to API Testing with Postman
Our webhook from Prismic is triggered.
After we send it to Prismic. But the change appears really late after those changes. Is it cache on Prismic side ?

Regards
Céline

Hi Céline,

If you query the latest master ref, the data should not be outdated. Similarly, if the ref is new and part of the URL, it makes the cache inactive since the ref was not requested before.

Can we have a little bit more information on how you are querying your data? Are you using URL/.cdn/something else, when are you doing it, is it strictly with your webhook? Any detail you can give us helps.

Thank you!

Hey Ezekiel,

Here under our answers

how you are querying your data?

We query Prismic API endpoint: https://darjeeling-production.cdn.prismic.io/api/v2 (with our API token)

  1. Query root enpoint to get master ref
  2. Query /documents/search API with the master ref (all pages) to get "uid", "type" and "data" for each entry
  3. Refresh our website data (CDN files) with the data from API

is it strictly with your webhook?

These API calls are triggered by every webhook

Thank you
Céline

Hi @celine.hervouet,

In order to figure out where the issue may lie and which way to continue troubleshooting this, here's what we'd recommend: when you update your repository's content (publish a new document, modify an existing one, etc.), you can have a look at your repository's API browser to verify the latest content is available there.

If it is up to date and the master ref in the API matches the master ref in the webhook, then the issue would be located in your project's code or in whichever deployment service you use (for example it could be a cache issue there, as you've mentioned). As a next step I'd recommend making some changes, checking your API browser and comparing the master refs with the webhook. This should clear up where the problem is coming from!

Let me know what your findings are, and I'll be happy to help further if needed :slight_smile: