Skip to content

refactor: simplify MFU cache policy and enhance documentation#59

Merged
TKorr merged 1 commit intomainfrom
fix/builder-api-guidelines
Mar 22, 2026
Merged

refactor: simplify MFU cache policy and enhance documentation#59
TKorr merged 1 commit intomainfrom
fix/builder-api-guidelines

Conversation

@TKorr
Copy link
Contributor

@TKorr TKorr commented Mar 22, 2026

Updated the MFU cache policy to remove the unnecessary bucket_hint parameter, streamlining its usage. Adjusted related documentation and examples to reflect this change, improving clarity and consistency across the API. Additionally, added a validate_policy method in CacheBuilder to enforce policy constraints, ensuring better error handling and user guidance.

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

Updated the MFU cache policy to remove the unnecessary `bucket_hint` parameter, streamlining its usage. Adjusted related documentation and examples to reflect this change, improving clarity and consistency across the API. Additionally, added a `validate_policy` method in `CacheBuilder` to enforce policy constraints, ensuring better error handling and user guidance.
@TKorr TKorr merged commit 4fc8811 into main Mar 22, 2026
17 checks passed
@TKorr TKorr deleted the fix/builder-api-guidelines branch March 22, 2026 16:02
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