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: README.md
+31Lines changed: 31 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -31,6 +31,7 @@ payloadDashboardAnalytics({
31
31
siteId: PLAUSIBLE_SITE_ID,
32
32
host: PLAUSIBLE_HOST, // optional, for self-hosted instances
33
33
},
34
+
cache: true,
34
35
access: (user:any) => {
35
36
returnBoolean(user);
36
37
},
@@ -94,6 +95,36 @@ payloadDashboardAnalytics({
94
95
access: (user:any) =>Boolean(user);
95
96
```
96
97
98
+
-`cache` | optional
99
+
100
+
Accepts a boolean or a configuration object for cache management. **Defaults to false**.
101
+
This creates a new collection type that will store cached data so that you don't get limited by the API.
102
+
103
+
```ts
104
+
cache: true;
105
+
```
106
+
107
+
-`slug` | optional
108
+
109
+
You can customise the slug of this new collection to avoid conflicts. Defaults to `analyticsData`.
110
+
111
+
-`routes` | optional
112
+
113
+
By default all routes are cached to one day. This is because for most analytics platforms the data report is about one day out anyway. Live data is cached to 5 minutes.
114
+
115
+
Object with any of these keys `globalAggregate``globalChart``pageAggregate``pageChart``report``live` set to a number in minutes.
0 commit comments