Add configurable size limit for persistent build cache with LRU eviction
まだ誰も着手していません。
評価
- 難易度
- 5/5
- 見積もり時間
- 1週間以上
- 初心者へのやさしさ
- 45/100
- issue の種類
- 機能追加
- 明瞭さ
- おおむね明確
- 活発さ
- 活発
- 技術スタック
- angular, typescript
- 領域
- build-system, cli
調査の方向性
build コマンドと serve コマンドで使用される永続キャッシュから始め、.angular/cache 用の既存のエントリポイント ng cache clean と比較します。cli.cache.maxSize の設定方法と測定方法を定義し、設定された上限を超えた時点で最も最近使用されていないエントリが削除されることを確認します。
索引モデルが issue の本文から書いたものです。
説明
Command
build, serve
Description
The Angular CLI persistent disk cache (.angular/cache) grows without bounds. On large projects, a single checkout accumulates tens of gigabytes of cached build artifacts. In our case, a single checkout reached 29 GB.
This was previously raised in #25116 and closed as not feasible with Webpack. Since Angular 17+, the build system uses esbuild, so the original constraint no longer applies.
Describe the solution you'd like
Add a configurable size cap (e.g., cli.cache.maxSize) with LRU eviction when the limit is reached. This is a common pattern in build tooling — Turborepo, Gradle, and most browsers' HTTP caches all implement bounded persistent caches.
Example configuration:
"cli": {
"cache": {
"enabled": true,
"maxSize": "2GB"
}
}
When the cache exceeds maxSize, the oldest/least-recently-used entries are evicted.
Describe alternatives you've considered
- Periodically running
ng cache cleanor manually deleting.angular/cache— works but is a manual maintenance burden, especially for developers unaware the cache is growing.
- 主要言語
- TypeScript
- スター
- 27k
- フォーク
- 11.8k
- 平均マージ
- 16時間 21分
- マージ済み PR(30日)
- 170
コントリビューションガイド
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
angular/angular-cli のほかの issue
-
area: @angular/build gemini-triaged
難易度 2/5 1〜3時間 初心者へのやさしさ 76/100
angular/angular-cli#34129 ·
-
area: @angular/cli gemini-triaged
難易度 2/5 1〜3時間 初心者へのやさしさ 84/100
angular/angular-cli#34057 ·
-
area: @angular/build gemini-triaged
難易度 2/5 1〜3時間 初心者へのやさしさ 74/100
angular/angular-cli#33955 ·
-
area: @angular/cli gemini-triaged
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
angular/angular-cli#33055 · コメント 1 件 · リアクション 3 件 ·
-
angular/build:library area: @angular/build gemini-triaged
angular/angular-cli#34131 · 担当者 1 名 ·