gbif / gbif-web

Apache License 2.0
6 stars 9 forks source link

Caching issue #474

Closed MortenHofft closed 2 months ago

MortenHofft commented 7 months ago

If i change a programme page and reindex the data, then it will not show the change on the new gbif.org. Not in 10 minutes, not in 30 minutes.

Current gbif.org shows the change immediately, which isn't ideal either with no cache, but it is to be preferred over hour lang caching. I guess 10 minutes, server and client cache is a reasonable time interval for this.

example entry: https://www.gbif-dev.org/programme/82243/bid-biodiversity-information-for-development at time of writing new gbif.org hasn't updated the information yet.

Caching is wrong at some level.

The content api has a public cache of 10 minutes, and the data seem to be updated instantly. So that makes me think the issue is in graphql layer. Most likely that we are caching responses across graphql requests.

danielvdm2000 commented 6 months ago

We also have caching issues regarding the preview pages.

I have tested both the local production build and demo.gbif-dev.org against the graphql.gbif-dev.org API.

The preview works on both client and server-side rendered pages in the local build, but only on client-side rendered pages on demo.gbif-dev.org. This leads me to believe that the problem is the caching of server-side rendered pages on demo.gbif-dev.org. Server-side rendered pages should not be cached if the preview=true query parameter is available in the URL of the request.

MortenHofft commented 2 months ago

I've looked into some of those odd caching cases. And those could be explained by the rest services providing hour long caches (3601 sec) - and that is respected internally by the Apollo rest datasource. So there isn't much we can do