cube-js / cube-js/cube

Documentation is inconsistent about in memory cache

Open
#6,591 1 comment 3 reactions 1 assignee Claimed by @hassankhan View on GitHub
docs
Dominant language
Rust
Stars
20.8k
Forks
2.1k
Avg merge
1d 2h
Merged PRs (30d)
181

Description

**Describe the bug**
Documentation is inconsistent

**Why?**
The current documentation contains some inconsistencies regarding the in-memory cache:

> To refresh in-memory cache and [pre-aggregations](https://cube.dev/docs/schema/reference/pre-aggregations) in the background, we recommend running a separate Cube Refresh Worker instance.
> from: https://cube.dev/docs/deployment/production-checklist/#set-up-refresh-worker

On the other hand:

> A Refresh Worker updates pre-aggregations and invalidates the in-memory cache in the background. ... Please note that the in-memory cache is just invalidated but not populated by Refresh Worker.
> from: https://cube.dev/docs/deployment/overview#refresh-worker

I guess the the second text is correct: Background invalidation is done by the refresh worker. Background refresh is not achievable in any way. (edited)

On a similar note, this text is very confusing:

> By default, Cube will check and invalidate the cache in the background when in [development mode](https://cube.dev/docs/configuration/overview#development-mode). In production environments, we recommend [running a Refresh Worker as a separate instance](https://cube.dev/docs/deployment/production-checklist#set-up-refresh-worker).
> We recommend enabling background cache invalidation in a separate Cube worker for production deployments. Please consult the [Production Checklist](https://cube.dev/docs/deployment/production-checklist) for more information.
> If background refresh is disabled, Cube will refresh the cache during query execution. Since this could lead to delays in responding to end-users, we recommend always enabling background refresh.
> from: https://cube.dev/docs/caching#in-memory-cache-refresh-keys

It starts by introducing and using the term background cache invalidation but then it continues with background refresh.
Again, I assume background refresh is not possible at all.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.