PackageTrack
Sign in Get early access

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 2026
2024 2025 2026
Release Pre-release

Releases

latest 55
  1. 0.22.3 23 Jan 2026
    Release notes

    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

    Open source →
  2. 0.22.2 12 Jan 2026
    Release notes

    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

    Full Changelog: v0.22.1...v0.22.2

    Open source →
  3. 0.22.1 11 Jan 2026
    Release notes

    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() and RuntimeOptions from the disk cache build. Use .with_spawner() and Spawner instead. At the same time, simplified the Runtime options 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() and RuntimeOptions from the disk cache build. Use .with_spawner() and Spawner instead. At the same time, simplified the Runtime options 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 madsim dependency when it is not needed.

    What's Changed

    New Contributors

    Full Changelog: v0.21.1...v0.22.1

    Open source →
  4. 0.22.1-rc1 11 Jan 2026 pre-release

    Nothing published for this version

  5. 0.21.2 23 Jan 2026
    Release notes

    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

    Open source →
  6. 0.21.1 12 Dec 2025
    Release notes

    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> and From<bincode::Error> (if feature serde is enabled) for Error to simplify error handling.

    What's Changed

    Full Changelog: v0.21.0...v0.21.1

    Open source →
  7. 0.21.0 08 Dec 2025
    Release notes
    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 to get_or_fetch(), and there are subtle changes in the arguments.
    • Hybrid cache get() API functions the same as the previous obtain(), and the obtain() 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 old obtain() API, support memory and disk cache read, request deduplication, and other optimizations. (The old get() API without disk cache request deduplication is deprecated.)
      • New get_or_fetch() API: Replace the old fetch() 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() (previously obtain()) and get_or_fetch() (previously fetch()) on the same key.
      • Refine error and result type with get_or_fetch() API.
    • Refine Source and Age preprotities. Now, Source refer to where the entry comes from, e.g. memory cache, disk cache, or outer; Age refer to the generation the entry is in the disk cache.
    • Refine Error type. Use OpenDAL-like error definition.
    • Auto implement Code for bytes::Bytes without serde feature.
    • Reduce task spawning on recovery.

    Bug Fixes:

    • Fix panics when cancelling spawned fetch requests.
    • Fix string trimming when parsing io throttle.
    • Fix build on x86 targets.

    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

    Full Changelog: v0.20.1...v0.21.0

    Open source →
  8. 0.20.1 27 Oct 2025
    Release notes

    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

    Full Changelog: v0.20.0...v0.20.1

    Open source →
  9. 0.20.0 23 Sep 2025
    Release notes

    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

    New Contributors

    • @Copilot made their first contribution in #1140

    Full Changelog: v0.19.2...v0.20.0

    Open source →
  10. 0.19.2 02 Sep 2025
    Release notes

    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_engine specified.

    What's Changed

    Full Changelog: v0.19.1...v0.19.2

    Open source →
  11. 0.19.1 21 Aug 2025
    Release notes

    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 serde for properties.

    What's Changed

    Full Changelog: v0.19.0...v0.19.1

    Open source →
  12. 0.19.0 14 Aug 2025

    Nothing published for this version

  13. 0.18.1 16 Aug 2025

    Nothing published for this version

  14. 0.18.0 13 Jul 2025

    Nothing published for this version

  15. 0.17.4 27 Jun 2025

    Nothing published for this version

  16. 0.17.3 22 May 2025

    Nothing published for this version

  17. 0.17.2 14 May 2025

    Nothing published for this version

  18. 0.17.1 09 May 2025

    Nothing published for this version

  19. 0.17.0 28 Apr 2025

    Nothing published for this version

  20. 0.16.1 10 Apr 2025

    Nothing published for this version

  21. 0.16.0 07 Apr 2025

    Nothing published for this version

  22. 0.15.4 22 Apr 2025

    Nothing published for this version

  23. 0.15.3 28 Mar 2025

    Nothing published for this version

  24. 0.15.2 26 Mar 2025

    Nothing published for this version

  25. 0.15.1 25 Mar 2025

    Nothing published for this version

  26. 0.15.0 24 Mar 2025

    Nothing published for this version

  27. 0.14.1 08 Feb 2025

    Nothing published for this version

  28. 0.14.0 14 Jan 2025

    Nothing published for this version

  29. 0.13.1 04 Dec 2024

    Nothing published for this version

  30. 0.13.0 02 Dec 2024

    Nothing published for this version

  31. 0.12.2 11 Oct 2024

    Nothing published for this version

  32. 0.12.1 10 Oct 2024

    Nothing published for this version

  33. 0.12.0 09 Oct 2024

    Nothing published for this version

  34. 0.9.5 24 Sep 2024

    Nothing published for this version

  35. 0.9.4 24 Sep 2024

    Nothing published for this version

  36. 0.9.3 20 Sep 2024

    Nothing published for this version

  37. 0.9.2 12 Sep 2024

    Nothing published for this version

  38. 0.9.1 31 Aug 2024

    Nothing published for this version

  39. 0.9.0 21 Aug 2024

    Nothing published for this version

  40. 0.8.1 08 Jul 2024

    Nothing published for this version

  41. 0.8.0 02 Jul 2024

    Nothing published for this version

  42. 0.7.3 05 Jun 2024

    Nothing published for this version

  43. 0.7.2 03 Jun 2024

    Nothing published for this version

  44. 0.7.1 31 May 2024

    Nothing published for this version

  45. 0.7.0 27 May 2024

    Nothing published for this version

  46. 0.6.4 28 Apr 2024

    Nothing published for this version

  47. 0.6.3 26 Apr 2024

    Nothing published for this version

  48. 0.6.2 24 Apr 2024

    Nothing published for this version

  49. 0.6.1 24 Apr 2024

    Nothing published for this version

  50. 0.6.0 23 Apr 2024

    Nothing published for this version

  51. 0.5.0 11 Apr 2024

    Nothing published for this version

  52. 0.4.0 12 Mar 2024

    Nothing published for this version

  53. 0.3.0 28 Dec 2023

    Nothing published for this version

  54. 0.2.0 18 Dec 2023

    Nothing published for this version

  55. 0.1.0 29 Nov 2023

    Nothing published for this version

Every package, every release, already written down.

The archive is open and free. Watching your own project is what we are building next.

Browse the archive