Skip to content

Use native shared fragments and simplify the local hot-path cache - #350

Closed
thomasklemm wants to merge 13 commits into
basecamp:mainfrom
thomasklemm:perf/native-fragment-cache
Closed

thomasklemm wants to merge 13 commits into
basecamp:mainfrom
thomasklemm:perf/native-fragment-cache

Conversation

@thomasklemm

@thomasklemm thomasklemm commented Oct 9, 2026 •

Copy link
Copy Markdown
Contributor

Requested by Thomas · project thread

Stack

Depends on #345; please merge the Solid Cache migration first. This PR is opened directly against upstream main, with head thomasklemm:perf/native-fragment-cache. GitHub cannot target the dependency branch because it exists only in the fork, so this PR currently includes #345's commits too. Once #345 lands, the remaining diff will be this follow-up.

The isolated follow-up is five commits on the rebased #345 head. Compare only the changes after #345.

Design

A fully shared/native replacement was prototyped and rejected after pronounced warm-request regressions. Keep the observer-validated per-worker response/authorization hot path; make presentation reuse Rails-native where its dependencies are safe.

  • Replace custom FIFO bookkeeping with one approximately 64 MiB Rails MemoryStore for completed HTML/gzip responses and independent authorization snapshots. Retain admission limits, auth/access checks, cold-render collapse and SQLite data_version checks before/after reads and on admission. CAMPFIRE_RESPONSE_CACHE_MB=0 disables this local cache.
  • Use native collection caching and Rails.cache.fetch for viewer-independent HTML fragments, backed by Use Solid Cache for the production Rails cache #345's shared Solid Cache. Content-derived keys cover actual body, room, creator and boost/booster presentation inputs, including SQL edits without timestamp changes.
  • Namespace presentation by immutable deployment revision, signing key, URL origin, mount prefix and locale. Unversioned builds get a boot-local namespace; use an immutable GIT_REVISION to share across workers.
  • Render message pages in consecutive runs. Attachment, mention and direct-room messages render fresh, while their neighbours keep content-keyed collection hits; previously one such message disabled caching for the whole page. The views iterate message_runs and render each run themselves, and the action controls cache through the cache_message_actions block helper. This keeps the page compilable ahead of time through Roundhouse, which lowers collection renders only in templates and drops statement-form cache_if blocks. Detached and primary-transaction renders bypass shared fragments. Remove duplicate full-message caching, the private fragment store and Jbuilder private-method overrides. JSON renders fresh; direct sidebars preload participants rather than cache incomplete membership dependencies.
  • Keep cold renders cheap: each message's cacheability is decided once per page, and a fragment_cached partial local tells the nested partials whether their message is already collection-cached. Collection-cached messages do not also write their text presentation and controls as separate Solid Cache entries; those nested fragments remain only for messages rendered fresh, such as in direct rooms or with mentions.
  • Correct the existing cold benchmark to clear all actual stores.

Oracle reviewed the hybrid and found no blocking correctness/security issue. This is not approval to merge and not a universal performance improvement.

Measurements against the parent

Re-measured on the current heads: parent #345 at 3a59b4e, this PR at f5be953. Sequential ABBA·ABBA, eight independent processes (four per revision), Ruby 4.0.7 + YJIT, production environment with actual Solid Cache (Redis only for Action Cable on the parent), fresh database per process with 20 users, 80 deterministic messages (boosts on every seventh) and 16 authenticated sessions. 200-request warmup per workload on one session; 30 timed samples per run (15 for previously unwarmed sessions). Values average each run's p50.

Workload Parent This PR Change
Room, previously unwarmed session 98.48 ms 44.73 ms -55%
40-message page, previously unwarmed session 84.19 ms 28.45 ms -66%
80-message search, previously unwarmed session 159.67 ms 46.23 ms -71%
Room, unrelated commit before each read 35.98 ms 36.38 ms +1%
Message page, unrelated commit before each read 24.55 ms 25.80 ms +5%
Search, unrelated commit before each read 49.46 ms 48.06 ms -3%
Room, fully cold caches 162.85 ms 151.68 ms -7%
Message page, fully cold caches 161.61 ms 144.68 ms -10%
Search, fully cold caches 310.12 ms 290.51 ms -6%

Warm whole-response hits stay around 1.8–2.2 ms in both versions, within run-to-run noise. No universal speedup claim. Shared fragments remove duplicate per-viewer rendering. With an unrelated commit before each read both versions are within noise. Fully cold renders were 35–40% slower than the parent on the previous head (e67f1a8) and are now 6–10% faster: profiling showed rich-text serialization repeated per message plus about 80 nested Solid Cache reads and inserts per cold page. Every revision's cold room p50 fell in a narrow band (parent 158.8–166.2 ms, this PR 149.0–157.6 ms). JSON throughput has not been benchmarked. These are single-process integration timings; concurrent multi-worker load is below.

Pages with mentions or attachments

The fixture data above contains no mentions, so it does not show that a single mention or attachment previously turned off the collection cache for a whole page. Local production-mode probe with Solid Cache, 60 requests with an unrelated commit before each read, p50 over two runs:

Workload Whole-page bypass Cached runs Change
80-message room, mention in every eighth message 119 ms 73 ms -39%
Search matching those messages 257 ms 129 ms -50%
Room without mentions 50 ms 49 ms unchanged

Concurrent load, measured by @namespaceMarcello

Docker, 3 Puma workers × 5 threads, 4 CPUs / 2.5 GB, 1,000 people, 300 holding WebSockets, a mixed chat workload. One run per image:

v1.5.6 base 05c5a2c #345 this PR (af029e3)
Requests/s, 24 concurrent 96.0 52.3 53.2 82.0
p50 / p99, 24 concurrent 211 / 827 ms 378 / 1,578 ms 351 / 1,597 ms 261 / 873 ms
Largest Puma worker 384 MB 938 MB 925 MB 599 MB
Worker restarts / 502s 0 / 0 5 / 6 4 / 4 0 / 0

With many viewers the base's per-viewer fragment keys hit 49% of the time on an active instance, these shared keys 91%.

Local verification on the current head

Rebased onto upstream main at ca9b963 through #345, without merge commits. The resulting tree matches the previous PR plus current main, except for the inherited lockfile regenerated with bundle lock. This retains the previous integration's caching, text-node auto-linking, script policy, and bumped message/text-presentation cache keys. The measurements above describe the historical revisions explicitly named there; they were not rerun for this history-only refresh.

  • Before pushing 49e1b2d, bin/rails db:prepare test on Ruby 4.0.9: 659 runs, 3,964 assertions, 0 failures/errors, 2 skips.
  • bin/rubocop: 335 files, no offenses.
  • Earlier local system verification on the previous integrated head: 30 runs, 221 assertions, 0 failures/errors/skips. System tests for the rebased head run in hosted CI.

@thomasklemm

Copy link
Copy Markdown
Contributor Author

Updated in 490a6ab, ready for another look:

A single attachment or mention on a page previously bypassed the collection cache for every message on it. Mentions are common in real rooms, but the benchmark fixtures contain none, so this didn't show up. Pages now render in consecutive runs: cacheable runs keep their content-keyed hits and only messages with further dependencies render fresh. A new FragmentRenderingTest case covers an attachment keeping its neighbours' hits (it fails on the previous head).

Local production-mode probe, unrelated commit before each read, p50: room with a mention in every eighth message 119 → 73 ms, matching search 257 → 129 ms, room without mentions unchanged. Unit (588 runs) and system tests (27 runs) pass; hosted CI is green. The description has the details.


Generated by Claude Code

@thomasklemm
thomasklemm marked this pull request as ready for review October 9, 2026 13:24
Copilot AI balanced review requested due to automatic review settings October 9, 2026 13:24
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Oct 9, 2026 •

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ⚠️ Failed 2026-10-27T13:07:13.954539Z
We couldn’t complete this review. Comment @codex review to try again.
49e1b2d New commits
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🔵 Needs a closer look

Cross-worker caching, authorization snapshots, and production SQLite contention require final human validation after dependency #345 lands.

0 open findings

What changed in this PR

Migrates shared Rails caching to Solid Cache while retaining a bounded per-worker cache for completed responses and authorization snapshots.

Changes:

  • Adds Solid Cache configuration, schema, restore handling, and documentation.
  • Replaces private fragment caching with content-keyed native Rails fragments.
  • Consolidates local response and record caching under one MemoryStore budget.

[!TIP]
If you aren't ready for review, convert to a draft PR.
Click "Convert to draft" or run gh pr ready --undo.
Click "Ready for review" or run gh pr ready to reengage.

File Description
Gemfile Adds Solid Cache.
Gemfile.lock Locks Solid Cache 1.0.10.
README.md Documents the revised cache architecture.
app/​controllers/​application_controller.rb Enables shared fragment-cache safeguards.
app/​controllers/​concerns/​cached_responses.rb Simplifies local response-cache integration.
app/​controllers/​concerns/​fragment_caching.rb Namespaces and conditionally enables fragments.
app/​controllers/​messages/​by_bots_controller.rb Preloads JSON presentation dependencies.
app/​controllers/​users/​sidebars_controller.rb Preloads direct-room participants.
app/​helpers/​messages_helper.rb Implements content-keyed, run-based rendering.
app/​helpers/​rooms_helper.rb Uses preloaded direct-room users.
app/​models/​fragment_cache.rb Removes the private fragment store.
app/​models/​message/​pagination.rb Updates presentation preloading behavior.
app/​models/​record_cache.rb Shares the local response-cache store.
app/​models/​response_cache.rb Replaces FIFO bookkeeping with MemoryStore.
app/​views/​messages/​_actions.html.erb Uses native conditional fragment caching.
app/​views/​messages/​_message.html.erb Removes duplicate nested message caching.
app/​views/​messages/​_message.json.jbuilder Renders JSON without fragment caching.
app/​views/​messages/​boosts/​_boost.json.jbuilder Removes cached boost JSON.
app/​views/​messages/​index.html.erb Uses run-based message rendering.
app/​views/​rooms/​refreshes/​show.turbo_stream.erb Uses run-based rendering for refreshes.
app/​views/​rooms/​show.html.erb Uses run-based room rendering.
app/​views/​searches/​index.html.erb Uses run-based search rendering.
app/​views/​users/​_user.json.jbuilder Renders current user JSON.
app/​views/​users/​sidebars/​rooms/​_direct.html.erb Removes direct-room fragment caching.
app/​views/​users/​sidebars/​show.html.erb Renders direct memberships fresh.
bench/​README.md Clarifies cold-cache measurement.
bench/​message_hot_paths.rb Clears every applicable cache store.
config/​cache.yml Configures Solid Cache limits.
config/​database.yml Adds dedicated cache databases.
config/​environments/​production.rb Selects Solid Cache in production.
config/​initializers/​fragment_cache.rb Removes custom Jbuilder/store overrides.
config/​initializers/​version.rb Defines deployment-specific presentation namespaces.
db/​cache_schema.rb Adds the Solid Cache schema.
db/​schema.rb Normalizes schema-file ending.
docs/​self-hosting.md Documents operation, backup, and restore.
docs/​upgrades/​solid-cache.md Adds migration and rollback guidance.
hooks/​post-restore Removes disposable cache files during restore.
test/​controllers/​cached_responses_test.rb Verifies sidebar response reuse.
test/​controllers/​fragment_cache_test.rb Expands fragment correctness coverage.
test/​helpers/​messages_helper_test.rb Tests native presentation reuse.
test/​models/​record_cache_test.rb Tests shared-budget snapshots.
test/​models/​response_cache_test.rb Tests MemoryStore admission and eviction.
test/​scripts/​solid_cache_restore_test.rb Tests cache cleanup during restore.

🧠 Review effort: Balanced


💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: af029e3012

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

# Cache in memory for now
config.cache_store = :redis_cache_store
# Persist the Rails cache in its own SQLite database.
config.cache_store = :solid_cache_store

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Prepare Solid Cache before starting benchmark Puma

When bench/compare_http.rb is run with an existing benchmark seed created before this migration (and thus containing only production.sqlite3), the candidate now needs the solid_cache_entries schema, but the driver copies the seed and launches bundle exec puma directly at lines 42–49 without the normal db:prepare startup step. SQLite can create the cache file on first connection but not its table, so the login or first fragment-cache access fails with a missing-table error instead of producing benchmark results; prepare each copied storage directory or load db/cache_schema.rb before starting Puma.

Useful? React with 👍 / 👎.

@namespaceMarcello

Copy link
Copy Markdown
Contributor

This PR under concurrent multi-worker HTTP load, the measurement the description lists as missing. All numbers come from one laptop (Docker Desktop on Windows 11, server container pinned to 4 CPUs with a 2.5 GB limit, overlay storage). They add to the single-process timings above; they don't replace them.

Setup. Production images built from each head, plus the official v1.5.6 image for reference: main at 05c5a2c (this PR's base), #345 at 3a59b4e, this PR at af029e3, and ghcr.io/basecamp/once-campfire:v1.5.6. Each image ran on a fresh copy of the same data, made by v1.5.6: 1,000 people, five open rooms, 100 messages each. The image's own settings gave 3 Puma workers × 5 threads. 300 people hold a room page's eight subscriptions over WebSocket and refresh their presence every 50 s. An HTTP driver acts as random people out of the 1,000, with the mix a chat sees: room pages, older pages, the sidebar, searches, permalinks, refreshes, posts, boosts, uploads, edits and deletes. It runs 4 concurrent for 4 minutes, then 24 concurrent for 5. One run per image, the three heads back to back. Our open #357 and #382 touch the same templates and response cache, and none of these images include them.

v1.5.6 05c5a2c #345 this PR
Requests/s, 4 concurrent 100.2 48.2 48.0 79.0
p50 / p99, 4 concurrent 31 / 169 ms 69 / 315 ms 69 / 304 ms 41 / 215 ms
Requests/s, 24 concurrent 96.0 52.3 53.2 82.0
p50 / p99, 24 concurrent 211 / 827 ms 378 / 1,578 ms 351 / 1,597 ms 261 / 873 ms
Largest Puma worker 384 MB 938 MB 925 MB 599 MB
Workers restarted during the run 0 5 4 0
502s 0 6 4 0

On 05c5a2c and #345 the workers grow until the kernel kills one at the container limit, which is where the 502s come from. Every accepted message was in the database after every run.

Today's main (eccb2d6) behaves like this PR's base under the same load: 47.6 and 30.4 requests/s, workers up to 968 MB, two restarted after "failed to check in within 60 seconds", and four Message::BroadcastUnreadRoomJob that failed with RedisClient::ReadTimeoutError. Rebuilt with Ruby 3.4.10 it does 41.2 requests/s, and with Puma 7.2.1 (v1.5.6's) 47.1. So the gap to v1.5.6 isn't the runtime or Puma.

One process, no Puma (same laptop, same data). 100 people each view room pages six times. A quiet instance has no writes between views. An active one refreshes someone else's presence between views, which an instance with open tabs does all the time. Room page p50:

quiet active
v1.5.6 10.7 ms 10.5 ms
05c5a2c 1.0 ms 43.3 ms
this PR 0.8 ms 15.8 ms

On the base, 49% of fragment reads hit when the instance is active, and 91% on this PR. The base's message fragment keys carry the viewer's user id and session digest, in a per-process store, so each person renders each message once per worker. Here they're shared. This doesn't contradict the "unrelated commit before each read" rows in the description: those read with one session, and with one viewer the base's keys hit too. The gap shows once many people read the same rooms. RSS growth of that process over 300 people × 6 views: base +257 MB, this PR +62 MB.

Written by Claude Code (AI assistant) on behalf of @namespaceMarcello, who directs this work.

@thomasklemm

Copy link
Copy Markdown
Contributor Author

Thanks @namespaceMarcello, this is the measurement the description was missing; I added a short summary there.

I also merged current main to clear the conflicts (message helper, message partial, ApplicationController): this PR's caching is kept, with main's text-node auto-linking and script policy on top. Unit, system and RuboCop pass locally on Ruby 4.0.9.

@namespaceMarcello

Copy link
Copy Markdown
Contributor

Most of what still separates this PR from v1.5.6 on a room page is deriving the fragment keys, and a change on top of 1d019ed removes most of it: two commits on namespaceMarcello:raw-fragment-keys, one helper and its tests, if you want to take them.

Where the time goes. message_runs calls message_fragment_cacheable? for every message on the page, then the collection renderer calls message_fragment_cache_key for every one it may cache, hit or miss. Both read message.body.body&.to_html: Action Text parses the stored body with Nokogiri and writes it back out. The key also JSON-encodes attributes, which casts every column, timestamps included. Measured on our laptop (Docker, this PR's image, one process, no Puma, data made as before: 1,000 people, by v1.5.6), for the 40 messages of a room page, records preloaded as message_runs does, two runs of 300 pages:

deriving the 40 keys ms per page objects per page
this PR 5.25 / 5.24 13,080
stored values (the commit) 0.97 / 0.99 2,680
v1.5.6's cache_key_with_version 0.09 / 0.09 240

The whole room page, same process, someone else's presence refreshed between views, 1,000 pages per run, three runs:

p50 per run objects per page
v1.5.6 9.9 / 10.2 / 9.9 ms 19,900
this PR 15.9 / 16.6 / 16.3 ms 37,000
this PR + the commit 12.2 / 12.1 / 12.4 ms 26,600

The change. The same rows and the same slices, read as stored: attributes_before_type_cast, and a SHA-256 of the body's stored bytes instead of the body re-serialized. The attachment check looks for <action-text-attachment in those bytes, case-insensitively, since another writer's markup isn't normalized. Any write to those rows still changes the key, through Rails or not. A write that changes the bytes but not the normalized HTML now changes the key too, so it costs one miss.

What was checked, on the same laptop:

  • Pages: every page that renders messages, for 20 people: five rooms, a direct room, two pages of older messages, the refresh stream and search. The data has every kind of message: plain, formatted, code, links and emails, emoji only, dollar signs, long, edited, a mention, a link preview, an image, a text file, a sound, boosts by several people. 182 pages per pass, all 200, byte-identical with the two keys once the CSRF tokens are masked: cold, warm, and with the new key over a cache still full of the old key's entries, as after a deploy.
  • Writes from another SQLite connection that skip the timestamps, to each thing a fragment shows (body, creator name and bio, room name, a message column, boost content, booster name), appear inside that message's element on the next warm page, with both keys.
  • Tests: this PR's suite (unit, system), RuboCop and Brakeman pass with the commits. They add three helper tests and one controller test: every row the fragment presents changes the key when edited with update_all; a body stored as non-UTF-8 bytes gets a key; an attachment tag written through SQL, in either case, keeps the message out of the shared cache; and a room whose message body was stored as invalid text renders. Ten mutants of the key and of the check each fail at least one test. Five of the same mutants applied to this PR's own key pass its current tests: room name, boosts, booster name, message columns, attachment check. On this PR's key the first two helper tests pass too; the third and the controller test raise in message_fragment_cacheable?, the 500 below.
  • Bytes that aren't UTF-8, written by another writer: a body stored as a blob renders 200 with both keys. A body stored as invalid text was a 500 with this PR's key (include? on the re-serialized body, in message_fragment_cacheable?) and renders 200 with the commit. A user name stored as invalid text is a 500 with both keys, from the JSON of the attributes; the commit doesn't change that.

Under load (the multi-worker run from the earlier comment: 3 Puma workers × 5 threads on 4 CPUs, 2.5 GB, 300 WebSocket viewers, an HTTP driver at 4 then 24 concurrent people):

v1.5.6 this PR this PR + the commit
Requests/s, 4 concurrent 101.6 75.1 / 77.9 79.0 / 80.4
Requests/s, 24 concurrent 97.7 79.8 / 81.7 83.6 / 83.1
Room page p50, 4 concurrent 34 ms 54 / 52 ms 50 / 49 ms
Older messages p50, 4 concurrent 22 ms 44 / 42 ms 39 / 39 ms
Largest Puma worker 377 MB 602 / 613 MB 563 / 556 MB

Two runs each for this PR and the commit, in opposite order, one for v1.5.6; every run with the commit did better than every run without it on each row. Every accepted message was stored, in every run. The gain is smaller than in one process: these two pages are about two in five of the driver's requests. Untouched by the commit and well apart from v1.5.6: refresh (a page catching up after a reconnect), p50 at 4 concurrent 138–144 ms against 64 ms.

Our open #357 and #382 touch the same templates and response cache; none of these images include them.

Written by Claude Code (AI assistant) on behalf of @namespaceMarcello, who directs this work.

@thomasklemm
thomasklemm force-pushed the perf/native-fragment-cache branch from 1d019ed to 966515e Compare October 27, 2026 12:29
thomasklemm and others added 13 commits October 27, 2026 12:37
The Solid Cache generator evaluates ENV.fetch("DATABASE") once, when it
writes cache.yml. Copied verbatim, it ran on every boot, so an unrelated
DATABASE variable in the host environment would redirect the cache.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01N8uPpsqMRJrp8jqATFJW45
Build on the Solid Cache migration without sacrificing observer-validated
response and authorization reuse. Replace custom FIFO bookkeeping with
Rails MemoryStore and move safe content-keyed collections to Rails.cache.
Remove private Jbuilder hooks and keep unsafe nested JSON uncached.

Amp-Thread-ID: https://ampcode.com/threads/T-01a11fe5-588c-71af-905f-84af46bd6951
One attachment, mention or other embedded attachment on a page bypassed
the collection cache for all of its messages. Mentions are common, so
many real pages rendered entirely uncached. Render consecutive runs
instead: cacheable runs keep their content-keyed hits, and only the
messages with further dependencies render fresh.

Local production-mode probe, 60 requests with an unrelated commit
before each read, p50 over two runs: an 80-message room with a mention
in every eighth message 119 -> 73 ms; a search matching those messages
257 -> 129 ms; a room without mentions unchanged (50 -> 49 ms).

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01N8uPpsqMRJrp8jqATFJW45
Serialize each message body once per render: the fragment key, the
cacheability check and the presentation each walked the rich text
document. Collection-cached messages no longer also write the text
presentation and message controls as separate Solid Cache entries; those
nested fragments remain for messages rendered fresh, such as direct rooms
and mentions.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01N8uPpsqMRJrp8jqATFJW45
Replace the helper's instance-variable memo with an explicit
fragment_cached local: render_messages decides cacheability once per
message and the partials read it, so no view state lives in helper
instance variables. Ahead-of-time compilers such as Roundhouse lower
partial locals but treat view instance variables as controller state.
Cold renders stay as fast as with the memo.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01N8uPpsqMRJrp8jqATFJW45
Roundhouse lowers a collection render only where it appears in a template,
and drops a statement-form `cache_if` block. Built through Roundhouse, the
helper-side `render_messages` emitted a single nil message instead of the
page, and `_actions` emitted nothing at all.

Message pages now iterate `message_runs` in the view and render each run
with the same collection cache and `fragment_cached` local. The action
controls cache through `cache_message_actions`, an output helper with a
block, under the same presentation namespace as before.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01BMME5CgsJpvz4dB74xsCEs
@thomasklemm
thomasklemm force-pushed the perf/native-fragment-cache branch 2 times, most recently from 6399714 to 49e1b2d Compare October 27, 2026 13:06
@thomasklemm

Copy link
Copy Markdown
Contributor Author

Closing in favour of #412, which shares these fragments between viewers with a one-file change to the existing keys, and #413, which takes the cost out of deriving them. Thanks @namespaceMarcello for the load runs and the stored-value keys. The 500 for a body stored as invalid text happens on main too; would you open your fix for it as its own PR?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants