Skip to content

Commit

Permalink
Logging relational cache events
Browse files Browse the repository at this point in the history
  • Loading branch information
dbeatty10 authored Nov 7, 2024
1 parent 74dfc54 commit c7ae3ec
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion website/docs/reference/global-configs/cache.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ sidebar: "Cache"

### Cache population

At the start of runs, dbt caches metadata about all the objects in all the schemas where it might materialize resources (such as models). By default, dbt populates the cache with information on all schemas related to the project.
At the start of runs, dbt caches metadata about all the objects in all the schemas where it might materialize resources (such as models). By default, dbt populates the relational cache with information on all schemas related to the project.

There are two ways to optionally modify this behavior:
- `POPULATE_CACHE` (default: `True`): Whether to populate the cache at all. To skip cache population entirely, use the `--no-populate-cache` flag or `DBT_POPULATE_CACHE: False`. Note that this does not _disable_ the cache; missed cache lookups will run queries, and update the cache afterward.
Expand All @@ -26,3 +26,11 @@ Or, to improve speed and performance while focused on developing Salesforce mode
dbt --cache-selected-only run --select salesforce
```

### Logging relational cache events

The `LOG_CACHE_EVENTS` config allows detailed logging for relational cache events, which are disabled by default.

```text
dbt --log-cache-events compile
```

0 comments on commit c7ae3ec

Please sign in to comment.