Interface ICachedCalculator<TInput, TOutput>
- Namespace
- MoonBark.GridPlacement.Core.Services
- Assembly
- MoonBark.GridPlacement.Core.dll
Cached calculator interface for performance-optimized calculations.
public interface ICachedCalculator<TInput, TOutput> : ICalculator<TInput, TOutput>, ICalculator
Type Parameters
TInputTOutput
- Inherited Members
Properties
CacheCapacity
Gets or sets the cache capacity.
int CacheCapacity { get; set; }
Property Value
CacheStatistics
Gets current cache statistics.
CalculatorCacheStatistics CacheStatistics { get; }
Property Value
Methods
Calculate(TInput)
Performs calculation with caching.
TOutput Calculate(TInput input)
Parameters
inputTInputInput data for calculation.
Returns
- TOutput
Cached or calculated result.
CalculateUncached(TInput)
Performs calculation without caching.
TOutput CalculateUncached(TInput input)
Parameters
inputTInputInput data for calculation.
Returns
- TOutput
Fresh calculation result.
ClearCache()
Clears the calculation cache.
void ClearCache()