Skip to content

Commit 20aa608

Browse files
morgan-at-cubemarianore-muttdata
authored andcommitted
docs: Update caching.mdx (cube-js#9417)
CX-approved refresh key recommendations
1 parent c4d22bc commit 20aa608

File tree

1 file changed

+6
-5
lines changed

1 file changed

+6
-5
lines changed

docs/pages/product/caching.mdx

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -221,11 +221,11 @@ client to initiate a new data loading query or know if the current invocation
221221
wasn't initiated earlier by another client. Only Refresh Key freshness
222222
guarantees are provided in this case.
223223

224-
For situations like real-time analytics or responding to live user changes to
225-
underlying data, the `refresh_key` query cache can prevent fresh data from
226-
showing up immediately. For these situations, the cache can effectively be
227-
disabled by setting the [`refresh_key.every`][ref-schema-ref-cube-refresh-key]
228-
parameter to something very low, like `1 second`.
224+
The `refresh_key` parameter can be used to control cache validity.
225+
For closer-to-real-time use cases, [`refresh_key.every`][ref-schema-ref-cube-refresh-key]
226+
can be set to a low value, such as `1 minute`, which is the lowest recommended option.
227+
228+
For truly real-time use cases, consider using [streaming pre-aggregations][ref-streaming-preaggs].
229229

230230
## Inspecting Queries
231231

@@ -297,6 +297,7 @@ cache types.
297297
[ref-schema-ref-cube-refresh-key]:
298298
/reference/data-model/cube#refresh_key
299299
[ref-schema-ref-preaggs]: /reference/data-model/pre-aggregations
300+
[ref-streaming-preaggs]: /product/caching/lambda-pre-aggregations#batch-and-streaming-data
300301
[ref-query-history]: /product/workspace/query-history#inspecting-api-queries
301302
[ref-perf-insights]: /product/workspace/performance#cache-type
302303
[ref-indexes]: /product/caching/using-pre-aggregations#using-indexes

0 commit comments

Comments
 (0)