Hi Team,We upgrade the Episerver from 10.2 to 11.9.2. ISynchronizedObjectInstanceCache is obsoleted. private readonly ISynchronizedObjectInstanceCache cache;
Is there any replacement for this? If so, Kindly provide me. ////we need to clear cache to avoid OutOfMemoryException cache.ObjectInstanceCache.Clear();Is this really avoid the OutOfMemoryException? Please, anyone clarify..Thanks in Advance..Regards,Krishna.
You should never need to Clear in that manor. You're probably best off to look for the leak causing the OutOfMemoryException.
Thanks Johan, ////we need to clear cache to avoid OutOfMemoryException cache.ObjectInstanceCache.Clear();We are using this code while import the bulk of products by Job. That time its need Johan. Could you please suggest any other Replacement for this obsolete code.?
ISynchronizedObjectInstanceCache is not obsoleted. The only thing that was obsoleted is Clear() method, which is considered harmful.
I am assuming you are importing Commerce products, the import should take care of the memory itself. If you have trouble with out of memory exception, you should contact developer support service, so we can look into it.
Thanks Quan,We are using the Custom import job for the product creation.
If you know the cache potion which has the biggest share, you can try to remove the master key of those cache entries. However it should be handled automatically if you are using the right APIs ...