Skip to content

Add policy feature flags#15

Merged
TKorr merged 4 commits intomainfrom
add-policy-feature-flags
Feb 15, 2026
Merged

Add policy feature flags#15
TKorr merged 4 commits intomainfrom
add-policy-feature-flags

Conversation

@TKorr
Copy link
Contributor

@TKorr TKorr commented Feb 15, 2026

Description

Related Issue

Fixes #

Type of Change

  • 🐛 Bug fix (non-breaking change that fixes an issue)
  • ✨ New feature (non-breaking change that adds functionality)
  • 💥 Breaking change (fix or feature that would cause existing functionality to change)
  • 📝 Documentation update
  • 🔧 Refactoring (no functional changes)
  • ⚡ Performance improvement
  • 🧪 Test addition or modification

How Has This Been Tested?

  • Unit tests
  • Integration tests
  • Manual testing

Test environment:

  • OS:
  • Rust version:

Checklist

  • My code follows the project's coding standards
  • I have run cargo fmt and cargo clippy
  • I have added tests for my changes
  • All new and existing tests pass (cargo test)
  • I have updated the documentation as needed
  • I have added an entry to CHANGELOG.md (if applicable)

Screenshots (if applicable)

Additional Notes

- Introduced feature flags for various eviction policies in `Cargo.toml`, allowing users to enable only the necessary policies for smaller builds.
- Updated documentation to reflect the new feature flags and their descriptions, enhancing clarity on usage and configuration.
- Modified `bench-support/Cargo.toml` to utilize the `policy-all` feature for comprehensive benchmarking.
- Ensured that the new feature flags are integrated into the cache builder and prelude for seamless access to different policies.
- Changed the default feature flags to include specific eviction policies: `policy-s3-fifo`, `policy_lru`, `policy-fast-lru`, `policy_lru_k`, and `policy-clock`.
- This update allows for more targeted usage of eviction strategies, enhancing modularity and performance based on expected workload patterns.
- Corrected the naming convention of the `policy_lru` feature flag to `policy-lru` for consistency with other feature flags.
- This change enhances clarity and maintains uniformity in the feature flag naming scheme.
@TKorr TKorr self-assigned this Feb 15, 2026
- Updated README and various documentation files to clarify that each eviction policy is gated behind a feature flag, improving modularity for builds.
- Added feature flag details for each policy in the documentation, ensuring users can easily identify and enable the necessary policies for their use cases.
- Included examples for minimal builds and emphasized the benefits of targeted feature usage for performance optimization.
@TKorr TKorr merged commit 47c61e7 into main Feb 15, 2026
16 checks passed
@TKorr TKorr deleted the add-policy-feature-flags branch February 15, 2026 12:46
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.

1 participant