Repository navigation
refactor(@angular/build): support direct builds and shared load cache in BundlerContext - #33914
Conversation
There was a problem hiding this comment.
Code Review
This pull request updates BundlerContext to support a shared load cache (sharedLoadCache) and introduces an optional invalidate method to the LoadResultCache interface. The feedback highlights two key issues: first, making invalidate optional in LoadResultCache could lead to stale cached results during rebuilds if a custom cache doesn't implement it, so it should be made required; second, sharing a single cache across multiple contexts can cause cross-contamination of watch files, triggering unnecessary rebuilds and degrading performance.
098dc50 to
36c71cb
Compare
46cfeb0 to
ceef82e
Compare
… in BundlerContext Enhance BundlerContext to allow incremental result caching without requiring a persistent esbuild context instance. The useContext constructor parameter defaults to incremental for backward compatibility while allowing callers to disable persistent contexts. Also support passing an external LoadResultCache instance to share load caches across contexts, and add an optional invalidate method to the LoadResultCache interface.
faa8b1d to
58095a9
Compare
…undler contexts Update setupBundlerContexts to instantiate a single MemoryLoadResultCache and share it across initial and non-initial global stylesheet BundlerContext instances. This allows global stylesheet contexts to share load cache state without instantiating multiple separate cache instances.
58095a9 to
c3293d7
Compare
|
This PR was merged into the repository. The changes were merged into the following branches:
|
|
This pull request has been automatically locked due to inactivity. Read more about our automatic conversation locking policy. This action has been performed automatically by a bot. |
Enhance BundlerContext to allow incremental result caching without requiring a persistent esbuild context instance. The useContext constructor parameter defaults to incremental for backward compatibility while allowing callers to disable persistent contexts. Also support passing an external LoadResultCache instance to share load caches across contexts, and add an optional invalidate method to the LoadResultCache interface.