Skip to content

fix(cache): clean up lib#4457

Merged
NathanFlurry merged 1 commit intomainfrom
03-18-fix_cache_clean_up_lib
Apr 5, 2026
Merged

fix(cache): clean up lib#4457
NathanFlurry merged 1 commit intomainfrom
03-18-fix_cache_clean_up_lib

Conversation

@MasterPtato
Copy link
Copy Markdown
Contributor

Description

Please include a summary of the changes and the related issue. Please also include relevant motivation and context.

Type of change

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • This change requires a documentation update

How Has This Been Tested?

Please describe the tests that you ran to verify your changes.

Checklist:

  • My code follows the style guidelines of this project
  • I have performed a self-review of my code
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation
  • My changes generate no new warnings
  • I have added tests that prove my fix is effective or that my feature works
  • New and existing unit tests pass locally with my changes

@railway-app railway-app bot temporarily deployed to rivet-frontend / rivet-pr-4457 March 19, 2026 02:05 Destroyed
@railway-app
Copy link
Copy Markdown

railway-app bot commented Mar 19, 2026

🚅 Deployed to the rivet-pr-4457 environment in rivet-frontend

Service Status Web Updated (UTC)
frontend-cloud 😴 Sleeping (View Logs) Web Apr 4, 2026 at 5:43 am
frontend-inspector 😴 Sleeping (View Logs) Web Mar 22, 2026 at 10:18 am
website ❌ Build Failed (View Logs) Web Mar 19, 2026 at 2:08 am
mcp-hub ✅ Success (View Logs) Web Mar 19, 2026 at 2:07 am
ladle ❌ Build Failed (View Logs) Web Mar 19, 2026 at 2:06 am

@pkg-pr-new
Copy link
Copy Markdown

pkg-pr-new bot commented Mar 19, 2026

More templates

@rivetkit/virtual-websocket

pnpm add https://pkg.pr.new/rivet-dev/rivet/@rivetkit/virtual-websocket@4457

@rivetkit/cloudflare-workers

pnpm add https://pkg.pr.new/rivet-dev/rivet/@rivetkit/cloudflare-workers@4457

@rivetkit/framework-base

pnpm add https://pkg.pr.new/rivet-dev/rivet/@rivetkit/framework-base@4457

@rivetkit/next-js

pnpm add https://pkg.pr.new/rivet-dev/rivet/@rivetkit/next-js@4457

@rivetkit/react

pnpm add https://pkg.pr.new/rivet-dev/rivet/@rivetkit/react@4457

rivetkit

pnpm add https://pkg.pr.new/rivet-dev/rivet/rivetkit@4457

@rivetkit/sql-loader

pnpm add https://pkg.pr.new/rivet-dev/rivet/@rivetkit/sql-loader@4457

@rivetkit/sqlite-vfs

pnpm add https://pkg.pr.new/rivet-dev/rivet/@rivetkit/sqlite-vfs@4457

@rivetkit/traces

pnpm add https://pkg.pr.new/rivet-dev/rivet/@rivetkit/traces@4457

@rivetkit/workflow-engine

pnpm add https://pkg.pr.new/rivet-dev/rivet/@rivetkit/workflow-engine@4457

@rivetkit/engine-runner

pnpm add https://pkg.pr.new/rivet-dev/rivet/@rivetkit/engine-runner@4457

@rivetkit/engine-runner-protocol

pnpm add https://pkg.pr.new/rivet-dev/rivet/@rivetkit/engine-runner-protocol@4457

commit: e65f84d

@claude
Copy link
Copy Markdown

claude bot commented Mar 19, 2026

PR Review: fix(cache): clean up lib

Overall this is a solid simplification PR - net -309 lines with cleaner APIs. A few notes:

Positives

  • Double-encoding removed: the old encoder chain through a ValueSerde intermediate type was needlessly indirect. The new Encoder: Fn(&Value) -> Result<Vec<u8>> is much cleaner.
  • Metrics moved to purge_local: previously tracked inside InMemoryDriver::delete_keys (wrong layer). Moving to RequestConfig::purge_local gives better cohesion and fires regardless of driver.
  • Arc clone instead of Driver clone: replacing driver.clone() with cache.clone() (an Arc clone) in the write spawn is strictly better.
  • todo!() removal: the Redis match arm was already todo!() before this PR; removing the enum variant entirely is the right move.

Issues to Verify

fetch_one and fetch_all were pub methods on RequestConfig. Check that nothing outside the cache package still calls them. A quick grep for fetch_one, fetch_all, or .rate_limit( would confirm.

rate_limit.rs is fully deleted. If any service was calling cache.rate_limit(), it would fail to compile. Worth confirming no downstream callers remain before merge.

Minor Notes

  • The default capacity jump from 1,000 to 10,000 (10x) is fine but worth a brief comment explaining the rationale (e.g., measured memory use is acceptable, or the previous limit was causing unnecessary cache evictions).
  • get now takes Vec<RawCacheKey> by value rather than &[String] by reference. This forces an allocation at each call site but is consistent with the new ownership model and not a real concern at this scale.

No blocking issues - the changes compile cleanly (Redis variant removed from both enum and match), and the simplifications are correct.

@MasterPtato MasterPtato force-pushed the 03-18-fix_cache_clean_up_lib branch from 175706a to 17d21f5 Compare March 19, 2026 20:53
@MasterPtato MasterPtato force-pushed the 03-18-fix_config_allow_configuring_topo_dcs_via_map_fix_pg_ssl_mode_config branch from f07072d to ea5642d Compare March 21, 2026 01:55
@MasterPtato MasterPtato force-pushed the 03-18-fix_cache_clean_up_lib branch from 17d21f5 to de18421 Compare March 21, 2026 01:55
@MasterPtato MasterPtato mentioned this pull request Mar 21, 2026
11 tasks
@MasterPtato MasterPtato force-pushed the 03-18-fix_config_allow_configuring_topo_dcs_via_map_fix_pg_ssl_mode_config branch from ea5642d to f6c3742 Compare March 24, 2026 00:30
@MasterPtato MasterPtato force-pushed the 03-18-fix_cache_clean_up_lib branch from de18421 to e65f84d Compare March 24, 2026 00:30
@MasterPtato MasterPtato mentioned this pull request Mar 24, 2026
11 tasks
@MasterPtato MasterPtato force-pushed the 03-18-fix_cache_clean_up_lib branch from e65f84d to 65200cf Compare March 24, 2026 00:36
@MasterPtato MasterPtato force-pushed the 03-18-fix_config_allow_configuring_topo_dcs_via_map_fix_pg_ssl_mode_config branch from f6c3742 to 10c9ce3 Compare March 24, 2026 00:36
@MasterPtato MasterPtato force-pushed the 03-18-fix_cache_clean_up_lib branch from 65200cf to ea32d90 Compare March 25, 2026 00:05
@MasterPtato MasterPtato force-pushed the 03-18-fix_config_allow_configuring_topo_dcs_via_map_fix_pg_ssl_mode_config branch from 10c9ce3 to 42a11eb Compare March 25, 2026 00:05
@MasterPtato MasterPtato force-pushed the 03-18-fix_cache_clean_up_lib branch from ea32d90 to ddfa969 Compare March 26, 2026 01:18
@MasterPtato MasterPtato force-pushed the 03-18-fix_config_allow_configuring_topo_dcs_via_map_fix_pg_ssl_mode_config branch from 42a11eb to 38080c6 Compare March 26, 2026 01:18
@MasterPtato MasterPtato force-pushed the 03-18-fix_cache_clean_up_lib branch from ddfa969 to bed6ca4 Compare March 26, 2026 20:50
@MasterPtato MasterPtato force-pushed the 03-18-fix_config_allow_configuring_topo_dcs_via_map_fix_pg_ssl_mode_config branch 2 times, most recently from 875b002 to 14a6bb1 Compare March 28, 2026 00:20
@MasterPtato MasterPtato force-pushed the 03-18-fix_cache_clean_up_lib branch from bed6ca4 to 10a4ff1 Compare March 28, 2026 00:20
This was referenced Mar 28, 2026
@MasterPtato MasterPtato force-pushed the 03-18-fix_cache_clean_up_lib branch from 10a4ff1 to 860e71e Compare March 30, 2026 19:40
@MasterPtato MasterPtato force-pushed the 03-18-fix_config_allow_configuring_topo_dcs_via_map_fix_pg_ssl_mode_config branch 2 times, most recently from 4b7394e to 876ae4d Compare March 31, 2026 01:40
@MasterPtato MasterPtato force-pushed the 03-18-fix_cache_clean_up_lib branch from 860e71e to 22498e8 Compare March 31, 2026 01:40
@MasterPtato MasterPtato mentioned this pull request Mar 31, 2026
11 tasks
@MasterPtato MasterPtato force-pushed the 03-18-fix_config_allow_configuring_topo_dcs_via_map_fix_pg_ssl_mode_config branch from 876ae4d to 1876954 Compare March 31, 2026 22:24
@MasterPtato MasterPtato force-pushed the 03-18-fix_cache_clean_up_lib branch from 22498e8 to 0b1f7e6 Compare March 31, 2026 22:24
@MasterPtato MasterPtato mentioned this pull request Mar 31, 2026
11 tasks
@MasterPtato MasterPtato force-pushed the 03-18-fix_config_allow_configuring_topo_dcs_via_map_fix_pg_ssl_mode_config branch from 1876954 to b648533 Compare April 1, 2026 02:11
@MasterPtato MasterPtato force-pushed the 03-18-fix_cache_clean_up_lib branch from 0b1f7e6 to 7e46b06 Compare April 1, 2026 02:11
@MasterPtato MasterPtato force-pushed the 03-18-fix_config_allow_configuring_topo_dcs_via_map_fix_pg_ssl_mode_config branch from b648533 to e1d3163 Compare April 2, 2026 02:47
@MasterPtato MasterPtato force-pushed the 03-18-fix_cache_clean_up_lib branch from 7e46b06 to 4080c12 Compare April 2, 2026 02:47
@MasterPtato MasterPtato force-pushed the 03-18-fix_config_allow_configuring_topo_dcs_via_map_fix_pg_ssl_mode_config branch from e1d3163 to 8e3bc38 Compare April 3, 2026 01:24
@MasterPtato MasterPtato force-pushed the 03-18-fix_cache_clean_up_lib branch from 4080c12 to 3606c4d Compare April 3, 2026 01:24
@NathanFlurry NathanFlurry mentioned this pull request Apr 4, 2026
11 tasks
Copy link
Copy Markdown
Member

NathanFlurry commented Apr 5, 2026

Merge activity

  • Apr 5, 11:11 AM UTC: A user started a stack merge that includes this pull request via Graphite.
  • Apr 5, 11:19 AM UTC: Graphite rebased this pull request as part of a merge.
  • Apr 5, 11:19 AM UTC: @NathanFlurry merged this pull request with Graphite.

@NathanFlurry NathanFlurry changed the base branch from 03-18-fix_config_allow_configuring_topo_dcs_via_map_fix_pg_ssl_mode_config to graphite-base/4457 April 5, 2026 11:16
@NathanFlurry NathanFlurry changed the base branch from graphite-base/4457 to main April 5, 2026 11:17
@NathanFlurry NathanFlurry force-pushed the 03-18-fix_cache_clean_up_lib branch from 3606c4d to 47ec108 Compare April 5, 2026 11:18
@NathanFlurry NathanFlurry merged commit 475ac64 into main Apr 5, 2026
10 of 12 checks passed
@NathanFlurry NathanFlurry deleted the 03-18-fix_cache_clean_up_lib branch April 5, 2026 11:19
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.

3 participants