Hi,
We are having some less than optimal experience with Discounts cache.
I understand that Discounts are cached when they are requested for the first time the application runs. I was asked to look at it and see if there's anything that can be improved, as some times seem to be longer than expected.
I looked at how this runs and noticed a few things.
- How much more efficient would it be to cache the objects themselves instead of just the index?
I did look into the "CreateCopy" method that does a MemberwiseClone(). I know it to be most performant method to do cloning within an acceptable number of objects (except a manual clone process, but the maintainability on that is not great), but I wonder if caching the object itself would not be better for a discount intensive website.
- After each discount save, the entire discount cache is cleared, instead of selectively updating the specific cache key
Best Regards,
Nuno Aguiar