Title: Add configurable size limit for persistent build cache with LRU eviction · Issue #33320 · angular/angular-cli · GitHub
Open Graph Title: Add configurable size limit for persistent build cache with LRU eviction · Issue #33320 · angular/angular-cli
X Title: Add configurable size limit for persistent build cache with LRU eviction · Issue #33320 · angular/angular-cli
Description: 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 re...
Open Graph Description: 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 arti...
X Description: 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 arti...
Opengraph URL: https://github.com/angular/angular-cli/issues/33320
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Add configurable size limit for persistent build cache with LRU eviction","articleBody":"### Command\n\nbuild, serve\n\n### Description\n\nThe 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**.\n\nThis 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.\n\n### Describe the solution you'd like\n\nAdd 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.\n\nExample configuration:\n```json\n\"cli\": {\n \"cache\": {\n \"enabled\": true,\n \"maxSize\": \"2GB\"\n }\n}\n```\n\nWhen the cache exceeds `maxSize`, the oldest/least-recently-used entries are evicted.\n\n### Describe alternatives you've considered\n\n- Periodically running `ng cache clean` or manually deleting `.angular/cache` — works but is a manual maintenance burden, especially for developers unaware the cache is growing.","author":{"url":"https://github.com/aqeelat","@type":"Person","name":"aqeelat"},"datePublished":"2026-06-07T11:30:28.000Z","interactionStatistic":{"@type":"InteractionCounter","interactionType":"https://schema.org/CommentAction","userInteractionCount":2},"url":"https://github.com/33320/angular-cli/issues/33320"}
| route-pattern | /_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format) |
| route-controller | voltron_issues_fragments |
| route-action | issue_layout |
| fetch-nonce | v2:d991d68b-5480-5dd3-c7ea-8a7b82e5781e |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | E2CE:22E2E4:1A8661:25C4C6:6A62FEBA |
| html-safe-nonce | 5c201936b305e0814c3f7ac94062f24d0b03c0ce17525aff50920809eb180484 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJFMkNFOjIyRTJFNDoxQTg2NjE6MjVDNEM2OjZBNjJGRUJBIiwidmlzaXRvcl9pZCI6Ijc2OTIzODc3MDQyNDk3MTIzMTQiLCJyZWdpb25fZWRnZSI6ImlhZCIsInJlZ2lvbl9yZW5kZXIiOiJpYWQifQ== |
| visitor-hmac | 67a079bea45ccb32db0099d3ac7d4994e196a82bce5dc8ee38290f6caf19446f |
| hovercard-subject-tag | issue:4607148988 |
| github-keyboard-shortcuts | repository,issues,copilot |
| google-site-verification | Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I |
| octolytics-url | https://collector.github.com/github/collect |
| analytics-location | / |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/angular/angular-cli/33320/issue_layout |
| twitter:image | https://opengraph.githubassets.com/68fc70bfd74d17c6de5de29f122f4bef2f1c74b6ba2b3f7d21a5e146898a232e/angular/angular-cli/issues/33320 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/68fc70bfd74d17c6de5de29f122f4bef2f1c74b6ba2b3f7d21a5e146898a232e/angular/angular-cli/issues/33320 |
| og:image:alt | 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 arti... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | aqeelat |
| hostname | github.com |
| expected-hostname | github.com |
| None | 14517cd57568049be7ed25bfe9708f10d1e36b7254adfd920dfb9d44bcc71c41 |
| turbo-cache-control | no-preview |
| go-import | github.com/angular/angular-cli git https://github.com/angular/angular-cli.git |
| octolytics-dimension-user_id | 139426 |
| octolytics-dimension-user_login | angular |
| octolytics-dimension-repository_id | 36891867 |
| octolytics-dimension-repository_nwo | angular/angular-cli |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 36891867 |
| octolytics-dimension-repository_network_root_nwo | angular/angular-cli |
| turbo-body-classes | logged-out env-production page-responsive |
| disable-turbo | false |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | 4b2ed33e3827bc186c45c037f9274b5493aaca4c |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width