[CT-1751] Config to optionally skip population of relation cache #6526
Closed
Labels
adapter_caching
Issues related to the adapter's relation cache
enhancement
New feature or request
Team:Adapters
Issues designated for the adapter area of the code
Users should have the ability to turn off relation cache population, if they really need to. It should still be "on" by default.
This is different from entirely disabling or skipping over the cache — we're just skipping the population of the cache on startup. When dbt needs to run caching queries, I think it should still report "cache miss," and then cache the result of the metadata query, if it needs to be used again in the same invocation.
Where
dbt-core/core/dbt/task/runnable.py
Lines 407 to 421 in 5453840
Who is it for?
YMMV
End users will need to experiment with the approach that's most efficient for them, between:
--no-populate-cache
I expect mileage may vary between dev, CI, and prod environments.
Questions
Would this break behavior around
--defer
, which expects to use the relation cache to determine if model X already exists in the dev schema, or should have its reference rewritten to use the schema defined in the other manifest?dbt-core/core/dbt/contracts/graph/manifest.py
Line 1018 in 5453840
Imagining a future where interactive compile/preview want to be both very fast, and able to correctly leverage
--defer
: We should also think more about making the adapter cache pluggable, as something that can live & persist outside of a singledbt-core
invocation. It would be the responsibility of that other application wrappingdbt-core
to handle cache invalidation (fun!).The text was updated successfully, but these errors were encountered: