The synchronization between Next.js cache and Cloudflare cache is not maintained during the revalidation process of getStaticProps

I am currently testing my Next.js application on Digital Ocean. After deploying it, I noticed that the getStaticProps revalidation feature is not working. Upon examining the cache headers, I observed that the revalidation parameter is being assigned to Cache-Control as follows:

Cache-Control: s-maxage=10800, stale-while-revalidate

My intention was to instruct Next.js to regenerate the page every 3 hours in order to update data. However, there seems to be a synchronization issue between Next.js and Cloudflare. The current status is:

Cf-Cache-Status: HIT
X-Nextjs-Cache: STALE

This indicates that Next.js considers the page expired, but Cloudflare does not. Therefore, even if Next.js regenerates the page in the background, the new version will not be displayed until the Cloudflare cache also expires.

I am looking for a solution to synchronize them. Currently, the application does not have a domain, so all aspects are managed by Digital Ocean. I am unsure whether this syncing issue is related to Digital Ocean, or if it can be resolved through configuration adjustments on either Next.js or Cloudflare.

Similar questions

If you have not found the answer to your question or you are interested in this topic, then look at other similar questions below or use the search

Framework7 `<a href="">` is malfunctioning

I placed a simple <a> element on a webpage that utilizes the FrameWork7 framework. Here is how it looks: <li><a href="https://www.google.com/"><img src="images/icons/black/users.png" alt="" title="" /><span>Go Google/span> ...

Is it possible to filter two arrays simultaneously?

I am dealing with two arrays: const array1 = [{ "id": "4521", "name": "Tiruchirapalli", "stateId": "101" }, { "id": "1850", ...

Trouble with Transitioning Material UI from version 4 to version 5

I have been working on upgrading my NextJS project from Material UI v4 to v5 by following the official guide available at: https://mui.com/guides/migration-v4/ However, after meticulously following all the steps outlined in the guide, I encountered a frus ...

Has the zip creation tool in the Google Doodle on April 24th been coded entirely in JavaScript?

Was the Gideon Sundback Google doodle created using JavaScript? I attempted to follow along in Firebug, but I couldn't quite grasp its implementation details. Any ideas on how it was possibly implemented? Any insights on the potential techniques use ...

The random quote generator or current tweet quote feature is malfunctioning

I am having trouble with a jQuery on click function that is not working to tweet the current quote. I am working on building a random quote machine and tweeting the current quote is essential. Despite successfully implementing the JSON API, I cannot seem t ...

Creating a JavaScript function that converts data from JSP to JavaScript using single

I am struggling to pass a string into a JavaScript function successfully. Despite trying multiple approaches, I have not been able to make it work. <a href="javascript:goFac('<%=name%>')"><%=name%></a> The variable "name ...

How to pass a JSON object to a component's constructor in Angular 2

In a unique situation, my primary component config.editor.component performs extensive processing and generates various JSON objects. I am content with this approach. The template for this component then proceeds to render another component - api.entry.com ...

Totally clueless when it comes to JSON

After diving into tutorials on JSON, the structure and syntax are finally clicking for me. However, I'm currently working on a project that requires a GET, and it seems like JSON could help with this. I've come across comparisons of JSON and AJA ...

Deploy your Next JS server on a shared hosting plan at Hostinger

Recently diving into the realm of professional web development, I embarked on a project to craft a website. This website was built using Next JS v13.5.3 with App Router, generating dynamic routes and mostly composed of components that pull data from a jso ...

An effective way to convert the string '3w2d24h' into milliseconds using JavaScript

Is there a way to convert the string '3w2d24h' to milliseconds using moment.js or any other library? ...

What is the best way to transfer a value to the database using a distinct module?

I have recently set up a basic express project and added a file named lib/userhandler.js in the main directory. //lib/userhandler.js exports.addUser = function(req, res){ // Accessing our internal database variable var db = req.db; // Retrieving ...

What steps should I take to make my include function operational?

As I develop a website for our entertainment company, I encounter language translation issues. Due to our diverse clientele, I implemented a multilingual feature on the site. However, during testing, all the text appeared blank. I suspect that the root of ...

gulp - synchronized gulp.pipe(gulp.dest) execution

Here's my challenge: I have two tasks, where Task B depends on Task A. In Task A, one of the requirements is to loop through an array and then use gulp.dest, but it seems like Task B will be executed before Task A is completed. The main goal of Task ...

What is the best way to extract information from a table that has been populated by a backend function?

My current task involves extracting data from a table that loads its rows slowly from a back-end ASP.NET function call. This table contains dimensions, with each row including the dimension name, database connection, an assigned checkbox, key field, and ...

Automatic button rotation

I managed to set up a button that works on click with a delay, making it semi-automatic. However, I'm struggling with getting it to not pause after just one click. Here's what I have so far: <!DOCTYPE html> <html> <body> &l ...

Acquiring the checkbox value with Vue.js

Hey there, I'm new to Vue and seeking some guidance. I'm working on building a filter bar that will display checked options in a collection view. For example, if "T-shirts" is checked, it should show all T-shirts from the database. Currently, I ...

What steps should I follow to integrate Semantic UI into a project using React and Express?

As a newcomer to Semantic/React/Express, I am wondering how to incorporate the stylesheet for Semantic in React. Do I need an html file that directly references the Semantic css and JavaScript files? Currently, I am not utilizing any html files. In my mai ...

Connecting PNPM to a standalone NextJS build

I'm currently working on creating a production-ready Dockerfile using NextJS in standalone mode along with PNPM. Within my next.config.js, I have specified the output configuration as follows: experimental: { outputStandalone: true, outputF ...

Clone a specific link within a div using jQuery only one time

I have a group of divs and I want to copy the link from the first div and put it into the last div (mobile-link). Currently, it is either duplicating all the links and inserting them all at once, or if I use :eq(0), it's placing the first link in each ...

When making a JQuery - Ajax get request, I did not receive the "extracts" or "exintro" (summary) property in the response

Lately, I've been working on a small web application that displays search results from Wikipedia on the webpage after entering a search term into a text field. This has been a project that I’ve dedicated a lot of time to. I have configured an ajax g ...