You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: samples/graph-webhooks-cache-invalidation/README.md
+18-5Lines changed: 18 additions & 5 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -38,16 +38,29 @@ Run `npm run webhook:create` and follow the instructions to create a webhook in
38
38
39
39
### 4. Create content
40
40
41
-
Go to your CMS and create a page in the path `/en/` (homepage for English language)
41
+
Go to your CMS and create a page
42
42
43
-
### 5. Build and start the project
43
+
### 5. Create an application
44
+
45
+
Go to your CMS → Settings → Applications. Click "Create application" In the dialog:
46
+
47
+
- In _Application Name_ write "webhooks_test"
48
+
- Under _choose start page_ choose "from existing" and choose the page you created in the previous step.
49
+
50
+
Click create application and, in the list of applications, click the application you just created and go to "Hostnames". Click "Add Hostname". In the dialog:
51
+
52
+
- In _Hostname_ write the URL of your application, e.g. https://example.com.
53
+
- Check the "Use a secure connection (HTTPS)" checkbox
54
+
- In _Locale_ choose All
55
+
56
+
### 6. Build and start the project
44
57
45
58
Run `npm run build` and `npm start`
46
59
47
60
> [!Note]
48
61
> The command `npm run dev` does not work because Next.js cache is disabled in dev mode
49
62
50
-
### 6. Test the cache
63
+
### 7. Test the cache
51
64
52
65
Go to `<your project URL>/en`. You will see a page with the message:
53
66
@@ -57,12 +70,12 @@ This page is generated and cached: 2025-10-03T12:42:40.453Z. 15 seconds ago
57
70
58
71
Refresh the page. You will see that the date is the same and that the seconds counter has _not_ restarted.
59
72
60
-
### 7. Trigger a cache revalidation
73
+
### 8. Trigger a cache revalidation
61
74
62
75
Go to your CMS, make changes to the page `/en/` you created previously and publish them.
63
76
64
77
Go to `<your project URL>/en`. You will see that a different date and that the counter has restarted
65
78
66
-
### 8. Clean-up
79
+
### 9. Clean-up
67
80
68
81
Run `npm run webhook:edit` and follow the instructions to delete the webhook that you don't need anymore.
0 commit comments