diff --git a/.github/template/template.yml b/.github/template/template.yml
index 92854f58..bd69a0e6 100644
--- a/.github/template/template.yml
+++ b/.github/template/template.yml
@@ -5,7 +5,7 @@ on:
env:
RUST_TOOLCHAIN_NIGHTLY: nightly-2024-03-17
CARGO_TERM_COLOR: always
- CACHE_KEY_SUFFIX: 20240621
+ CACHE_KEY_SUFFIX: 20240821
jobs:
misc-check:
diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml
index 55bed569..a4d967eb 100644
--- a/.github/workflows/main.yml
+++ b/.github/workflows/main.yml
@@ -13,7 +13,7 @@ on:
env:
RUST_TOOLCHAIN_NIGHTLY: nightly-2024-03-17
CARGO_TERM_COLOR: always
- CACHE_KEY_SUFFIX: 20240621
+ CACHE_KEY_SUFFIX: 20240821
jobs:
misc-check:
name: misc check
diff --git a/.github/workflows/pull-request.yml b/.github/workflows/pull-request.yml
index b336e352..abc9a0d7 100644
--- a/.github/workflows/pull-request.yml
+++ b/.github/workflows/pull-request.yml
@@ -12,7 +12,7 @@ on:
env:
RUST_TOOLCHAIN_NIGHTLY: nightly-2024-03-17
CARGO_TERM_COLOR: always
- CACHE_KEY_SUFFIX: 20240621
+ CACHE_KEY_SUFFIX: 20240821
jobs:
misc-check:
name: misc check
diff --git a/CHANGELOG.md b/CHANGELOG.md
index 245a4e0b..4f8a355b 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -1,3 +1,29 @@
+## 2024-08-21
+
+| crate | version |
+| - | - |
+| foyer | 0.11.0 |
+| foyer-common | 0.9.0 |
+| foyer-intrusive | 0.9.0 |
+| foyer-memory | 0.7.0 |
+| foyer-storage | 0.10.0 |
+| foyer-bench | 0.3.0 |
+
+
+
+### Changes
+
+- Support disk cache on raw block device.
+- Support fine-grained storage engine runtime configuration.
+- Enhance performance via reducing page fault.
+- Refine storage engine framework for future features.
+- Expose `Weighter` trait.
+- Support `serde` for more configurations.
+- Update `foyer-bench` with more fine-grained configurations.
+- Fix panices with `None` recover mode.
+
+
+
## 2024-08-15
| crate | version |
diff --git a/README.md b/README.md
index 815b0358..587f3872 100644
--- a/README.md
+++ b/README.md
@@ -39,13 +39,13 @@ Feel free to open a PR and add your projects here:
To use *foyer* in your project, add this line to the `dependencies` section of `Cargo.toml`.
```toml
-foyer = "0.10"
+foyer = "0.11"
```
If your project is using the nightly rust toolchain, the `nightly` feature needs to be enabled.
```toml
-foyer = { version = "0.10", features = ["nightly"] }
+foyer = { version = "0.11", features = ["nightly"] }
```
### Out-of-the-box In-memory Cache
@@ -102,7 +102,7 @@ use anyhow::Result;
use chrono::Datelike;
use foyer::{
DirectFsDeviceOptionsBuilder, FifoPicker, HybridCache, HybridCacheBuilder, LruConfig, RateLimitPicker, RecoverMode,
- RuntimeConfigBuilder, TombstoneLogConfigBuilder,
+ RuntimeConfig, TokioRuntimeConfig, TombstoneLogConfigBuilder,
};
use tempfile::tempdir;
@@ -143,12 +143,16 @@ async fn main() -> Result<()> {
.with_flush(true)
.build(),
)
- .with_runtime_config(
- RuntimeConfigBuilder::new()
- .with_thread_name("foyer")
- .with_worker_threads(4)
- .build(),
- )
+ .with_runtime_config(RuntimeConfig::Separated {
+ read_runtime_config: TokioRuntimeConfig {
+ worker_threads: 4,
+ max_blocking_threads: 8,
+ },
+ write_runtime_config: TokioRuntimeConfig {
+ worker_threads: 4,
+ max_blocking_threads: 8,
+ },
+ })
.build()
.await?;
diff --git a/foyer-bench/Cargo.toml b/foyer-bench/Cargo.toml
index f9cd01af..1b8304b8 100644
--- a/foyer-bench/Cargo.toml
+++ b/foyer-bench/Cargo.toml
@@ -1,6 +1,6 @@
[package]
name = "foyer-bench"
-version = "0.2.3"
+version = "0.3.0"
edition = "2021"
authors = ["MrCroxx "]
description = "bench tool for foyer - the hybrid cache for Rust"
@@ -17,7 +17,7 @@ clap = { workspace = true }
console-subscriber = { version = "0.4", optional = true }
fastrace = { workspace = true, optional = true }
fastrace-jaeger = { workspace = true, optional = true }
-foyer = { version = "0.10.4", path = "../foyer" }
+foyer = { version = "0.11.0", path = "../foyer" }
futures = "0.3"
hdrhistogram = "7"
itertools = { workspace = true }
diff --git a/foyer-common/Cargo.toml b/foyer-common/Cargo.toml
index 4ae2a261..44ae7422 100644
--- a/foyer-common/Cargo.toml
+++ b/foyer-common/Cargo.toml
@@ -1,6 +1,6 @@
[package]
name = "foyer-common"
-version = "0.8.1"
+version = "0.9.0"
edition = "2021"
authors = ["MrCroxx "]
description = "common components for foyer - the hybrid cache for Rust"
diff --git a/foyer-intrusive/Cargo.toml b/foyer-intrusive/Cargo.toml
index ab44037e..cbcfc837 100644
--- a/foyer-intrusive/Cargo.toml
+++ b/foyer-intrusive/Cargo.toml
@@ -1,6 +1,6 @@
[package]
name = "foyer-intrusive"
-version = "0.8.1"
+version = "0.9.0"
edition = "2021"
authors = ["MrCroxx "]
description = "intrusive data structures for foyer - the hybrid cache for Rust"
@@ -11,7 +11,7 @@ readme = "../README.md"
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
[dependencies]
-foyer-common = { version = "0.8.1", path = "../foyer-common" }
+foyer-common = { version = "0.9.0", path = "../foyer-common" }
itertools = { workspace = true }
[features]
diff --git a/foyer-memory/Cargo.toml b/foyer-memory/Cargo.toml
index fa7828e0..7ed46d0e 100644
--- a/foyer-memory/Cargo.toml
+++ b/foyer-memory/Cargo.toml
@@ -1,6 +1,6 @@
[package]
name = "foyer-memory"
-version = "0.6.1"
+version = "0.7.0"
edition = "2021"
authors = ["MrCroxx "]
description = "memory cache for foyer - the hybrid cache for Rust"
@@ -15,8 +15,8 @@ ahash = "0.8"
bitflags = "2"
cmsketch = "0.2.1"
fastrace = { workspace = true }
-foyer-common = { version = "0.8.1", path = "../foyer-common" }
-foyer-intrusive = { version = "0.8.1", path = "../foyer-intrusive" }
+foyer-common = { version = "0.9.0", path = "../foyer-common" }
+foyer-intrusive = { version = "0.9.0", path = "../foyer-intrusive" }
futures = "0.3"
hashbrown = "0.14"
itertools = { workspace = true }
diff --git a/foyer-storage/Cargo.toml b/foyer-storage/Cargo.toml
index 69d4c299..bb37deb5 100644
--- a/foyer-storage/Cargo.toml
+++ b/foyer-storage/Cargo.toml
@@ -1,6 +1,6 @@
[package]
name = "foyer-storage"
-version = "0.9.3"
+version = "0.10.0"
edition = "2021"
authors = ["MrCroxx "]
description = "storage engine for foyer - the hybrid cache for Rust"
@@ -24,8 +24,8 @@ bytes = "1"
clap = { workspace = true }
either = "1"
fastrace = { workspace = true }
-foyer-common = { version = "0.8.1", path = "../foyer-common" }
-foyer-memory = { version = "0.6.1", path = "../foyer-memory" }
+foyer-common = { version = "0.9.0", path = "../foyer-common" }
+foyer-memory = { version = "0.7.0", path = "../foyer-memory" }
futures = "0.3"
itertools = { workspace = true }
lazy_static = "1"
diff --git a/foyer/Cargo.toml b/foyer/Cargo.toml
index 2d114c72..126b5692 100644
--- a/foyer/Cargo.toml
+++ b/foyer/Cargo.toml
@@ -1,6 +1,6 @@
[package]
name = "foyer"
-version = "0.10.4"
+version = "0.11.0"
edition = "2021"
authors = ["MrCroxx "]
description = "Hybrid cache for Rust"
@@ -15,9 +15,9 @@ rust-version = "1.77"
ahash = "0.8"
anyhow = "1"
fastrace = { workspace = true }
-foyer-common = { version = "0.8.1", path = "../foyer-common" }
-foyer-memory = { version = "0.6.1", path = "../foyer-memory" }
-foyer-storage = { version = "0.9.3", path = "../foyer-storage" }
+foyer-common = { version = "0.9.0", path = "../foyer-common" }
+foyer-memory = { version = "0.7.0", path = "../foyer-memory" }
+foyer-storage = { version = "0.10.0", path = "../foyer-storage" }
futures = "0.3"
pin-project = "1"
tokio = { workspace = true }