perf(registry): scope and bound render artifact caching - #1552
Merged
ricardo-devis-agullo merged 2 commits intoAug 17, 2026
Conversation
Generated with [Devin](https://devin.ai) Co-Authored-By: Devin <158243242+devin-ai-integration[bot]@users.noreply.github.com>
Contributor
There was a problem hiding this comment.
Pull request overview
Replaces global artifact caching with bounded, registry-scoped caching while sharing render state across GET and batch routes.
Changes:
- Adds a 1000-entry namespaced LRU cache.
- Shares one render helper per registry.
- Adds cache isolation, eviction, retry, and coalescing tests.
Reviewed changes
Copilot reviewed 10 out of 12 changed files in this pull request and generated no comments.
Show a summary per file
| File | Description |
|---|---|
plans/README.md |
Marks Plan 004 complete. |
packages/oc/test/unit/utils-bounded-cache.js |
Tests LRU behavior. |
packages/oc/test/unit/registry-routes-helpers-get-component-artifact-cache.js |
Tests isolation and reload behavior. |
packages/oc/test/unit/registry-router-artifact-cache.js |
Tests cross-route coalescing. |
packages/oc/src/utils/bounded-cache.ts |
Implements the bounded cache. |
packages/oc/src/registry/routes/helpers/get-component.ts |
Adopts registry-scoped caching. |
packages/oc/src/registry/routes/components.ts |
Accepts an injected renderer. |
packages/oc/src/registry/routes/component.ts |
Accepts an injected renderer. |
packages/oc/src/registry/router.ts |
Shares one renderer between routes. |
packages/oc/src/globals.d.ts |
Removes obsolete cache declarations. |
packages/oc/package.json |
Removes the direct dependency. |
package-lock.json |
Updates dependency metadata. |
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
Use the established implementation instead of maintaining custom LRU invariants while preserving the registry-scoped namespaced API. Generated with [Devin](https://devin.ai) Co-Authored-By: Devin <158243242+devin-ai-integration[bot]@users.noreply.github.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
nice-cacheartifact store with a registry-scoped, 1000-entry namespaced wrapper around the battle-testedlru-cache@10.4.3Test plan
lru-cache@10.4.3(no vulnerabilities)npm --workspace packages/oc run buildnpm --workspace packages/oc run test-silent(1016 passing)npm --workspace packages/oc run bench:burstnpm --workspace packages/oc run bench:quick -- --baseline-file=/tmp/oc-plan004-before.json --max-rps-regression-percent=5 --max-p95-regression-percent=5 --expect-success-rate=1Generated with Devin