Developer forum

Forum » Ecommerce - Standard features » Product categories not appearing directly after import

Product categories not appearing directly after import

Paul Nilsson
Reply

I'm importing products and product categories directly to the database.
But when I go in to the site the categories are not there.
I'll have to restart the site in ISS or go in to the backend of Dynamicweb and save to make them appair on the site.

Is the product categories cashed somehow and how can I get the categories to appair directly on the page without restarting the IIS or saving in the backend?

 


Replies

 
Nicolai Høeg Pedersen
Reply

Try calling Dynamicweb.eCommerce.Products.Categories.Category.ClearCache() and Dynamicweb.eCommerce.Products.Categories.Field.ClearCache()

BR Nicolai

 
Paul Nilsson
Reply

I don't have any of these functions.
Could I be missing a reference in my project?

But I have this: Dynamicweb.eCommerce.Products.Group.ClearCache();
Will this work?

 
Nicolai Høeg Pedersen
Reply

Hi Paul

Sorry, Field.ClearCache() is internal... I will make it public.

If you call Dynamicweb.Content.Caching.StorageManager.Current.GetStorage("eCommerce").Clear() you should be home clear.

BR Nicolai

 
Paul Nilsson
Reply

Ok, thanks I will try this.

 

You must be logged in to post in the forum