Caching Mechanism and Management
A feature that accelerates repeated conversions by storing and retrieving previously computed number-to-word results in an in-memory cache.
Overview
Key Points
Aspect
Description
Code Example
// Initialize the humanizer control with caching enabled
var humanizer = new SiticoneHumanizerInt();
// Enable caching to store conversion results
humanizer.EnableCaching = true;
// Set the maximum cache size to 2000 entries
humanizer.CacheSize = 2000;
// Convert a number to cache its result
humanizer.Number = 12345;
Console.WriteLine("Conversion result: " + humanizer.Words);
// Later, clear the cache if needed (for example, after bulk updates)
humanizer.ClearCache();Best Practices
Practice
Recommendation
Code Example
Common Pitfalls
Pitfall
Explanation
Code Example
Usage Scenarios
Scenario
How It Works
Code Example
Real Life Usage Scenarios
Scenario
Explanation
Code Example
Troubleshooting Tips
Tip
Details
Code Example
Review
Aspect
Consideration
Summary
Summary Point
Description
Final Integration Example
Last updated