Developer forum

Forum » Development » Unit stock are not updated unless you restart the IIS Server

Unit stock are not updated unless you restart the IIS Server

Keerthy Sethupathy
Reply

Greetings, 

For our customer that are running 9.7.4, have an issue with using units. 
We are updating the EcomStockUnit table trough a Integration Job(Dynamicweb Provider). This works a charm.

The stock is updated in the table, but not on the frontend, this only happens after we restart the server. 

So i guess the issue is with some caching.  

In the frontend we use the stock ecomprices and units loop, so nothing custom there. 

Is there any way we ourselves can clear the unit cache?

I am aware that there has been alot changes to the unit logic in DW 9.8, but for our customer this will not be an option at the moment. 

 


Replies

 
Martin Moen
Reply

Bump! I have the same issue on 9.13.7.
Did you solve this in anyway?

 
Morten Snedker Dynamicweb Employee
Morten Snedker
Reply

Hi Keerthy,

I do not not exactly when it was introduced, but in the current api there is a Dynamicweb.Ecommerce.Services.StockService.ClearCache() method that will clear the mentioned cache. If it is available in your version you may find a suitable notification (or scheduled task) that will execute the method. You may use this for an automated clear of cache.

Also, in recent versions you will this point in the administration:

 

From here you will have the ability to clear/refresh caches manually.

BR
Snedker

 

 

You must be logged in to post in the forum