Hello,
For each product there are associated cost calculators like: discount, discount by merchant, bonus by merchant, monthly discount etc. In future, more cost calculators would be added.
We have a concrete product class and many decorators for each cost calculation. All products should use all of the calculators, because the calculators decide to apply their calculations by the product's properties like product merchant id, category id, color etc.
And, there are millions of products in our system which needs to be calculated. So, we better cache the decorated calculators. Because, decorating each product entity in runtime would be expensive. But this is hard with decorator pattern. It seems like a smell to use this pattern in our situation.
What do you suggest? Should we use decorators, strategy or chain-of-responsibility pattern? Or no-pattern.