foyer-common
common components for foyer - Hybrid cache for Rust
0.22.3
11M downloads/mo
#2992 most downloaded on crates.io
foyer-rs/foyer
What this package is like to depend on
Last release 7 months ago
23 Jan 2026
Ships fairly regularly
a new release about every 3 weeks
Rarely documented
notes for 10 of 54 stable releases
Nothing withdrawn
no release was ever pulled
3 years old
55 releases · first in 2023
10 releases in the last 12 months
see the full history below
Release timeline
55 releases · Nov 2023 to Jan 2026Releases
latest 55-
0.22.323 Jan 2026Release notes
Open source →2026-01-23
Release
crate version foyer 0.22.3 foyer-tokio 0.22.3 foyer-common 0.22.3 foyer-memory 0.22.3 foyer-storage 0.22.3 foyer-bench 0.22.3 Changes
- Fix: Fix false positive hybrid cache miss metrics with
HybridCache::get_or_fetch()API call.
Full Changelog: v0.22.2...v0.22.3
- Fix: Fix false positive hybrid cache miss metrics with
-
0.22.212 Jan 2026Release notes
Open source →2026-01-12
Release
crate version foyer 0.22.2 foyer-tokio 0.22.2 foyer-common 0.22.2 foyer-memory 0.22.2 foyer-storage 0.22.2 foyer-bench 0.22.2 Changes
- Unpin hashbrown version.
What's Changed
- chore: release foyer v0.22.2 by @MrCroxx in #1254
- build: fine tune dependencies by @tisonkun in #1252
Full Changelog: v0.22.1...v0.22.2
-
0.22.111 Jan 2026Release notes
Open source →2026-01-11
Release
crate version foyer 0.22.1 foyer-tokio 0.22.1 foyer-common 0.22.1 foyer-memory 0.22.1 foyer-storage 0.22.1 foyer-bench 0.22.1 Note
foyer v0.22.0 was yanked due to an incorrect publish.
Changes
Important
Breaking Changes:
- Remove
.with_runtime_options()andRuntimeOptionsfrom the disk cache build. Use.with_spawner()andSpawnerinstead. At the same time, simplified theRuntimeoptions that are no longer needed. #1229 - Align io engine and engine config naming. All items that need to be built by the user are named
..Builder, and all items built by foyer are named..Config. #1232
Changes:
- Remove
.with_runtime_options()andRuntimeOptionsfrom the disk cache build. Use.with_spawner()andSpawnerinstead. At the same time, simplified theRuntimeoptions that are no longer needed. #1229 - Align io engine and engine config naming. All items that need to be built by the user are named
..Builder, and all items built by foyer are named..Config. #1232 - Support get memory entry count via API and metrics.
- Fix LRU high priority weight calculation.
- Update dependencies. Drop
madsimdependency when it is not needed.
What's Changed
- chore: use mea primitives over tokio::sync by @tisonkun in #1209
- chore: fix changelog v0.21.0 release date by @MrCroxx in #1213
- chore:
impl From<std::io::Error> for foyer::Errorby @shikhar in #1215 - refactor: impl From for bincode error by @MrCroxx in #1216
- chore: update changelog, bump version by @MrCroxx in #1219
- chore: remove some stale codes, pin hashbrown version by @MrCroxx in #1222
- chore: fix a typo in README by @DenisGorbachev in #1175
- chore: remove unused codes by @MrCroxx in #1225
- docs(storage): Add Raw safety note by @jayvdb in #1227
- chore: adapt to the latest fastrace by @MrCroxx in #1230
- refactor: introduce
Spawnerandfoyer-tokiocrate by @MrCroxx in #1229 - chore: do not run pages actions on fork by @yihong0618 in #1228
- chore: drop two unused dependiences by @yihong0618 in #1231
- refactor: align io engine and engine config naming by @MrCroxx in #1232
- chore: use jiff over chrono by @tisonkun in #1233
- chore: update license header by @MrCroxx in #1236
- chore: upgrade to mea 0.6.0 by @tisonkun in #1235
- fix: fix LRU high priority weight calculation by @yihong0618 in #1238
- feat: support get mem cache entry count via API and metrics by @MrCroxx in #1241
- perf: improve recovery performance by @leiysky in #1243
- refactor: try reduce arc-swap by @tisonkun in #1245
- fix: fix feature passing among crates for publishing by @MrCroxx in #1246
- chore: release foyer v0.22.1 by @MrCroxx in #1247
New Contributors
- @DenisGorbachev made their first contribution in #1175
- @jayvdb made their first contribution in #1227
Full Changelog: v0.21.1...v0.22.1
- Remove
-
0.22.1-rc111 Jan 2026 pre-releaseNothing published for this version
-
0.21.223 Jan 2026Release notes
Open source →2026-01-23
Release
crate version foyer 0.21.2 foyer-common 0.21.2 foyer-memory 0.21.2 foyer-storage 0.21.2 foyer-bench 0.21.2 Changes
- Fix: Fix false positive hybrid cache miss metrics with
HybridCache::get_or_fetch()API call.
Full Changelog: v0.22.1...v0.21.2
- Fix: Fix false positive hybrid cache miss metrics with
-
0.21.112 Dec 2025Release notes
Open source →2025-12-12
Release
crate version foyer 0.21.1 foyer-common 0.21.1 foyer-memory 0.21.1 foyer-storage 0.21.1 foyer-bench 0.21.1 Changes
- Implement
From<std::io::Error>andFrom<bincode::Error>(if featureserdeis enabled) forErrorto simplify error handling.
What's Changed
- chore: fix changelog v0.21.0 release date (#1213) by @MrCroxx in #1214
- refactor: impl from
std::io::Errorbincode::Errorfor Error by @MrCroxx in #1217 - chore: release foyer v0.21.1 by @MrCroxx in #1218
Full Changelog: v0.21.0...v0.21.1
- Implement
-
0.21.008 Dec 2025Release notes
Open source →crate version foyer 0.21.0 foyer-common 0.21.0 foyer-memory 0.21.0 foyer-storage 0.21.0 foyer-bench 0.21.0 Changes
Important
Breaking Changes:
- Hybrid cache and memory cache
fetch()API is renamed toget_or_fetch(), and there are subtle changes in the arguments. - Hybrid cache
get()API functions the same as the previousobtain(), and theobtain()API is removed because the naming is obscure. - The Error type returned by all interfaces that return Result and Error has been refactored. When manually implementing Code for cache key or value, please pay attention to how errors are handled as described in the interface comments.
Features and Enhances:
- Refine hybrid cache read-related APIS.
- New
get()API: Replace the oldobtain()API, support memory and disk cache read, request deduplication, and other optimizations. (The oldget()API without disk cache request deduplication is deprecated.) - New
get_or_fetch()API: Replace the oldfetch()API, support memory and disk cache read, automatic cache refill on cache miss, request duduplication, and other optimizations. - Fix panics with race condition while using both
get()(previouslyobtain()) andget_or_fetch()(previouslyfetch()) on the same key. - Refine error and result type with
get_or_fetch()API.
- New
- Refine
SourceandAgepreprotities. Now,Sourcerefer to where the entry comes from, e.g. memory cache, disk cache, or outer;Agerefer to the generation the entry is in the disk cache. - Refine
Errortype. UseOpenDAL-like error definition. - Auto implement
Codeforbytes::Byteswithoutserdefeature. - Reduce task spawning on recovery.
Bug Fixes:
- Fix panics when cancelling spawned fetch requests.
- Fix string trimming when parsing io throttle.
- Fix build on
x86targets.
Testing:
- Support simulating io latency with psync io engine in
foyer-bench. - Refine hybrid cache fuzzy test.
What's Changed
- build: refine ci triggers by @MrCroxx in #1151
- fix: fix enabling dev-dependencies features with the same crate by @MrCroxx in #1154
- chore: bump main branch to v0.21.0-dev, fulfill changelogs by @MrCroxx in #1156
- test: introduce simulated io latency for psync engine by @MrCroxx in #1159
- chore: bump deps by @MrCroxx in #1160
- test: separate read and fetch in hybrid cache fuzzy test by @MrCroxx in #1161
- fix: removed unnecessary constraints to allow use of non-static keys by @rrauch in #1163
- chore: fix typos by @MrCroxx in #1165
- fix: fix issue with untrimmed string while parsing throttle by @vadim2404 in #1164
- fix: preserve raw cache capacity across shards by @Xuanwo in #1167
- fix: fix disk op duration metrics by @MrCroxx in #1169
- chore: bump changelog by @MrCroxx in #1172
- chore: reduce task spawning during recovery by @leiysky in #1174
- refactor: refine read-related APIs to fix panics and refine APIs by @MrCroxx in #1177
- docs: update docs for foyer v0.20 by @MrCroxx in #1179
- fix: fix foyer build with nightly toolchain by @MrCroxx in #1180
- fix: restore default random state for hybrid get and fetch by @MrCroxx in #1181
- feat: expose fetch state and role by @MrCroxx in #1182
- refactor: use foyer defined result for memory get_or_fetch by @MrCroxx in #1184
- refactor: use foyer defined result type for memory get_or_fetch() by @MrCroxx in #1185
- refactor: refine properties, remove source, refine age by @MrCroxx in #1186
- feat: support entry source (outer/memory/disk), refine test utils by @MrCroxx in #1187
- refactor: expose entry source by @MrCroxx in #1188
- fix: spawn fetch task to prevent from leader cancel by @MrCroxx in #1189
- docs: refine foyer crate rustdoc, use filtered readme by @MrCroxx in #1191
- feat: impl Code for bytes::Bytes by @tisonkun in #1195
- perf: split encode/decode bench w/wo serde feature by @MrCroxx in #1196
- fix: fastant cannot build on x86 by @tisonkun in #1197
- ci: run test with single worker and deadlock detection by @MrCroxx in #1199
- refactor: loose get_or_fetch() closure trait bounds by @MrCroxx in #1203
- refactor: refine error design by @MrCroxx in #1205
- refactor: refine get_or_fetch closure args by @MrCroxx in #1206
- refactor: refine Error and doc for Code trait impl by @MrCroxx in #1208
- chore: release foyer v0.21.0 by @MrCroxx in #1207
New Contributors
- @rrauch made their first contribution in #1163
- @vadim2404 made their first contribution in #1164
- @leiysky made their first contribution in #1174
Full Changelog: v0.20.1...v0.21.0
- Hybrid cache and memory cache
-
0.20.127 Oct 2025Release notes
Open source →Release
crate version foyer 0.20.1 foyer-common 0.20.1 foyer-memory 0.20.1 foyer-storage 0.20.1 foyer-bench 0.20.1 Changes
- Fix metrics "Disk Op Duration".
What's Changed
- fix: fix disk op duration metrics (#1169) by @MrCroxx in #1170
- chore: release foyer v0.20.1 by @MrCroxx in #1171
Full Changelog: v0.20.0...v0.20.1
-
0.20.023 Sep 2025Release notes
Open source →2025-09-23
Release
crate version foyer 0.20.0 foyer-common 0.20.0 foyer-memory 0.20.0 foyer-storage 0.20.0 foyer-bench 0.20.0 Changes
- Fix race condition (panic / deadlock) when there are concurrent disk cache write operations and fetch operations on the same key.
- Fix heap-use-after-free on dropping foyer cache / hybrid cache while there are still ongoing disk IOs.
- Remove property
ephemeral.
What's Changed
- chore: cherry-pick changelog of v0.19.0, bump main version by @MrCroxx in #1102
- chore: update changelog for v0.18.1 by @MrCroxx in #1106
- feat: support serde for properties by @MrCroxx in #1108
- chore: fulfill changelog by @MrCroxx in #1112
- docs: move website repo to subdir in this repo by @MrCroxx in #1124
- fix: fix website base url by @MrCroxx in #1125
- fix: fix foyer website logo by @MrCroxx in #1126
- docs: fix license check badge by @MrCroxx in #1130
- fix: fix ephemeral entry becomes ephemeral after access by @MrCroxx in #1123
- docs: update arch docs by @MrCroxx in #1132
- chore: update npm dependencies version by @MrCroxx in #1133
- docs: continue updating arch docs by @MrCroxx in #1134
- docs: update arch docs by @MrCroxx in #1135
- docs: update case study - RisingWave by @MrCroxx in #1136
- docs: update case study - RisingWave by @MrCroxx in #1137
- fix: HUAF in PsyncIoEngine during task cancellation by @Copilot in #1140
- docs: add arch and case study docs link in readme by @MrCroxx in #1146
- fix: fix issue 1121 panics on concurrent disk cache write & fetch by @MrCroxx in #1147
- refactor: restore raw waiter with std hashmap by @MrCroxx in #1148
- build: refine ci triggers (#1151) by @MrCroxx in #1152
- fix: fix enabling dev-dependencies features (#1154) by @MrCroxx in #1155
- chore: release foyer v0.20.0 by @MrCroxx in #1150
New Contributors
- @Copilot made their first contribution in #1140
Full Changelog: v0.19.2...v0.20.0
-
0.19.202 Sep 2025Release notes
Open source →Releases
crate version foyer 0.19.2 foyer-common 0.19.2 foyer-memory 0.19.2 foyer-storage 0.19.2 foyer-bench 0.19.2 Changes
- Fix: Fix hybrid cache in-memory compatible mode conditional statement without
io_enginespecified.
What's Changed
- fix: fix is_noop() logic in store.rs (#1113) by @MrCroxx in #1114
- chore: release foyer v0.19.2 by @MrCroxx in #1115
Full Changelog: v0.19.1...v0.19.2
- Fix: Fix hybrid cache in-memory compatible mode conditional statement without
-
0.19.121 Aug 2025Release notes
Open source →Releases
crate version foyer 0.19.1 foyer-common 0.19.1 foyer-memory 0.19.1 foyer-storage 0.19.1 foyer-bench 0.19.1 Changes
- Feature: Support
serdefor properties.
What's Changed
- feat: support serde for properties (#1108) by @MrCroxx in #1109
- chore: release foyer v0.19.1 by @MrCroxx in #1110
Full Changelog: v0.19.0...v0.19.1
- Feature: Support
-
0.19.014 Aug 2025Nothing published for this version
-
0.18.116 Aug 2025Nothing published for this version
-
0.18.013 Jul 2025Nothing published for this version
-
0.17.427 Jun 2025Nothing published for this version
-
0.17.322 May 2025Nothing published for this version
-
0.17.214 May 2025Nothing published for this version
-
0.17.109 May 2025Nothing published for this version
-
0.17.028 Apr 2025Nothing published for this version
-
0.16.110 Apr 2025Nothing published for this version
-
0.16.007 Apr 2025Nothing published for this version
-
0.15.422 Apr 2025Nothing published for this version
-
0.15.328 Mar 2025Nothing published for this version
-
0.15.226 Mar 2025Nothing published for this version
-
0.15.125 Mar 2025Nothing published for this version
-
0.15.024 Mar 2025Nothing published for this version
-
0.14.108 Feb 2025Nothing published for this version
-
0.14.014 Jan 2025Nothing published for this version
-
0.13.104 Dec 2024Nothing published for this version
-
0.13.002 Dec 2024Nothing published for this version
-
0.12.211 Oct 2024Nothing published for this version
-
0.12.110 Oct 2024Nothing published for this version
-
0.12.009 Oct 2024Nothing published for this version
-
0.9.524 Sep 2024Nothing published for this version
-
0.9.424 Sep 2024Nothing published for this version
-
0.9.320 Sep 2024Nothing published for this version
-
0.9.212 Sep 2024Nothing published for this version
-
0.9.131 Aug 2024Nothing published for this version
-
0.9.021 Aug 2024Nothing published for this version
-
0.8.108 Jul 2024Nothing published for this version
-
0.8.002 Jul 2024Nothing published for this version
-
0.7.305 Jun 2024Nothing published for this version
-
0.7.203 Jun 2024Nothing published for this version
-
0.7.131 May 2024Nothing published for this version
-
0.7.027 May 2024Nothing published for this version
-
0.6.428 Apr 2024Nothing published for this version
-
0.6.326 Apr 2024Nothing published for this version
-
0.6.224 Apr 2024Nothing published for this version
-
0.6.124 Apr 2024Nothing published for this version
-
0.6.023 Apr 2024Nothing published for this version
-
0.5.011 Apr 2024Nothing published for this version
-
0.4.012 Mar 2024Nothing published for this version
-
0.3.028 Dec 2023Nothing published for this version
-
0.2.018 Dec 2023Nothing published for this version
-
0.1.029 Nov 2023Nothing published for this version