Caching Deployment Plan
The enableCache feature accelerates deployment plan generation by caching node metadata dependencies. This optimization allows the planning process to skip SQL re-rendering for unchanged nodes, dramatically reducing plan generation times for large projects.
Caching Usage
The cache is disabled by default. It's recommended to keep caching disabled unless you are experiencing very long plan generation times.
The feature can be enabled in two ways:
- CLI flag:
coa plan --enableCache - UI toggle: Available in the "Parameters" step of the deployment wizard.
For troubleshooting planning or deployment issues, it is always recommended to run the plan with caching turned off to ensure a full, clean render.
How Caching Works
When enabled, the enableCache flag modifies the plan generation process. The caching occurs when you run a plan; you do not need to deploy that plan for the cache to be populated.
Plan Generation Process
- Before rendering a Node during the planning phase, the system calculates a unique hash based on all the inputs that affect its compilation.
- It checks a central cache for an existing entry matching that hash within the target environment.
- If a valid entry is found, the system uses the cached information and skips the rendering step.
- If no entry is found, the system renders the node using the current mechanism and then saves the result to the cache for future plans.
What Is Not Cached
To manage expectations, it's important to know what this feature does not do:
- It does not cache the final compiled DDL (the SQL code itself).
- It does not apply to in-workspace actions like
Run All,Create All, orValidate.
Keep In Mind
- Caching only affects deployment plans (CLI and UI). It does not apply to workspace actions like Run All or Validate.
- If a cached result is unavailable or invalid, Coalesce automatically falls back to the normal rendering process.
- Cache entries are automatically evicted if unused for 90 days.
- First-time use: The first time you enable caching—or if the cache hasn’t been used for more than 90 days—you won’t see performance improvements immediately. Instead, Coalesce will populate the cache during that plan. Performance benefits appear on subsequent plans, where cached results can be reused.