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:f905e789-2c7e-5799-e921-24128d87dffc |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | DC34:26C2A:12CAD41:1948711:6A62CE4C |
| html-safe-nonce | 6c9bec1ba316811e99b694e27bed3dfd9544c03647d6708f3a1b8d04fb4a301a |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJEQzM0OjI2QzJBOjEyQ0FENDE6MTk0ODcxMTo2QTYyQ0U0QyIsInZpc2l0b3JfaWQiOiI1NzQ0ODkzNTczMzkwODQ3NTY0IiwicmVnaW9uX2VkZ2UiOiJpYWQiLCJyZWdpb25fcmVuZGVyIjoiaWFkIn0= |
| visitor-hmac | 949a6ec091260c8de75c386a01f837b5e44daeb653a282868841d66406181073 |
| 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 | df33b1b61ee7b9a0af988199bfc3503c9c1acafb1f1d40e1f140ea7c84f890dd |
| 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 | d41cd1bdb290013455c0ac430fa755621733f5eb |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width