Don't miss out Virtual Happy Hour this Friday (April 26).

Try our conversational search powered by Generative AI!

ISynchronizedObjectInstanceCache Obsolete in Episerver 11.9.2

Vote:
 

Hi Team,

We upgrade the Episerver from 10.2 to 11.9.2. ISynchronizedObjectInstanceCache  is obsoleted.
 

private readonly ISynchronizedObjectInstanceCache cache;

cache.ObjectInstanceCache.Clear();

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.

#195193
Edited, Jul 17, 2018 12:59
Vote:
 

You should never need to Clear in that manor. You're probably best off to look for the leak causing the OutOfMemoryException.

#195215
Jul 17, 2018 22:48
Vote:
 

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.?

#195231
Jul 18, 2018 10:25
Vote:
 

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. 

#195233
Jul 18, 2018 11:17
Vote:
 

Thanks Quan,

We are using the Custom import job for the product creation.

#195279
Jul 19, 2018 10:14
Vote:
 

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 ...

#195283
Jul 19, 2018 10:58
* You are NOT allowed to include any hyperlinks in the post because your account hasn't associated to your company. User profile should be updated.