Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 18 additions & 0 deletions docs/src/data/changelog/v1.0.4/xdg-cache-paths.mdx
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
---
version: "v1.0.4"
category: "experiments-updated"
---

#### Cache and plugin directories follow platform conventions

Terragrunt's global cache directory now resolves to the platform's user cache location instead of a hard-coded `~/.cache/terragrunt`. On Linux this honors `XDG_CACHE_HOME` (still `~/.cache/terragrunt` by default), on macOS it resolves to `~/Library/Caches/terragrunt`, and on Windows it resolves under `%LocalAppData%`. The CAS content store, the auto provider cache, and the IaC engine plugin directory all move with it.

Existing caches at the previous locations are not migrated. They become orphaned and continue to consume disk space until removed.

Consider deleting the old paths to reclaim that space if you are on macOS or Windows, or have configured a custom `XDG_CACHE_HOME`:

```bash
# CAS store and engine plugins under the legacy ~/.cache layout

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🟡 Minor | ⚡ Quick win

Comment should mention the provider cache.

The comment lists "CAS store and engine plugins" but omits the auto provider cache, which is also stored at the legacy ~/.cache/terragrunt location (at ~/.cache/terragrunt/providers). This is inconsistent with line 8, which correctly mentions all three components.

🔧 Proposed fix to include all affected components
-# CAS store and engine plugins under the legacy ~/.cache layout
+# CAS store, provider cache, and engine plugins under the legacy ~/.cache layout
 rm -rf ~/.cache/terragrunt

As per coding guidelines: Ensure documentation is accurate and complete. Based on context snippet 3, the provider cache uses EnsureCacheDir() to construct its path at cacheDir/providers.

📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
# CAS store and engine plugins under the legacy ~/.cache layout
# CAS store, provider cache, and engine plugins under the legacy ~/.cache layout
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@docs/src/data/changelog/v1.0.4/xdg-cache-paths.mdx` at line 15, Update the
heading/comment to include the provider cache alongside the CAS store and engine
plugins (e.g., mention "CAS store, engine plugins, and provider cache") so it
accurately reflects that the provider cache is also stored under the legacy
~/.cache/terragrunt (specifically ~/.cache/terragrunt/providers); reference the
provider cache path construction using EnsureCacheDir() which builds
cacheDir/providers to ensure consistency with the rest of the doc.

rm -rf ~/.cache/terragrunt
```

Loading