Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature request: Cache cleanup #4774

Open
2 tasks
TrevorBurnham opened this issue Feb 20, 2025 · 0 comments
Open
2 tasks

Feature request: Cache cleanup #4774

TrevorBurnham opened this issue Feb 20, 2025 · 0 comments
Labels
feature-request A feature should be added or improved. needs-triage This issue or PR still needs to be triaged.

Comments

@TrevorBurnham
Copy link

TrevorBurnham commented Feb 20, 2025

Describe the feature

As a regular CDK user, the ~/Library/Caches/com.amazonaws.jsii dir on my Mac (aka defaultCacheRoot) has steadily grown. It currently stands at over 13GB, mostly made up of old versions of CDK dependencies.

I'd like to request some mechanism for preventing this cache from growing indefinitely.

Use Case

I should be able to use CDK without having to worry about gradually running out of disk space.

Proposed Solution

Two options, which are not mutually exclusive:

  1. Add a documented "clear cache" command to the CDK CLI that would allow users to clear the contents of the JSII cache directory (and possibly other caches as well; my ~/Library/Caches/aws-cdk-lib and ~/Library/Caches/@aws-cdk stand at a total of 3GB).
  2. Add a system for automatically removing items from the cache that have not been used in a certain amount of time (say, 30 days). For example, on each run JSII could touch files that it reads from the cache, then delete all files in the cache whose mtime is over the time limit.

Other Information

No response

Acknowledgements

  • I may be able to implement this feature request
  • This feature might incur a breaking change

CDK version used

2.178.2

Environment details (OS name and version, etc.)

macOS 15.3.1

@TrevorBurnham TrevorBurnham added feature-request A feature should be added or improved. needs-triage This issue or PR still needs to be triaged. labels Feb 20, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature-request A feature should be added or improved. needs-triage This issue or PR still needs to be triaged.
Projects
None yet
Development

No branches or pull requests

1 participant