Developer forum

Forum » Development » Product catalog cached?

Product catalog cached?

David Löfqvist
Reply

Hi!

Im having issues with the product catalog tree generation.

After a import of data that has several groups and relations that should become nodes in the treeview, not all nodes become visible/added in the tree. I see that the database contains the right data and relations as a newly node that works has. Im thinking its a caching issue and i try to fix that calling some code:

                Dynamicweb.Ecommerce.Common.Application.KillVariantGroups();
                Dynamicweb.Ecommerce.Common.Application.KillVariantOptions();
                Dynamicweb.Ecommerce.Variants.VariantGroupService vgs = new VariantGroupService();
                Dynamicweb.Ecommerce.Products.GroupService gs = new GroupService();
                vgs.ClearVariantGroupsCache();
                vgs.ClearVariantGroupPropertiesCache();
                vgs.ClearOptionValues();
                Dynamicweb.Ecommerce.Products.ProductGroupRelation.ClearCache();
                gs.ClearCache();

But in the end i need to restart the appool to get it to work. After that the Group comes out in the product catalog treeview and on the webbshop. 

Im running rapido and Dynamicweb.dll 9.5.13 version.

Any tips or best practise in dealing with these issues, because i need it to work without restarting the whole webbshop?

Regards, David

 


Replies

 
Dynamicweb Employee
Dmitriy Benyuk
Reply

Hi David,
I am not able to reproduce this issue on the Dynamicweb 9.7.2 version. So it is probably fixed, so you need to upgrade.
I was using XML -> Ecom provider job with the source XML like that:
<tables>
  <table tableName="EcomGroups">
    <item table="EcomGroups">                  
      <column columnName="GropuName">Top</column>
      <column columnName="ParentGroup" isNull="true" />
    </item>    
    <item table="EcomGroups">                  
      <column columnName="GropuName">Child1</column>
      <column columnName="ParentGroup">Top</column>      
    </item>    
    <item table="EcomGroups">                  
      <column columnName="GropuName">Child2</column>
      <column columnName="ParentGroup">Top</column>      
    </item>    
  </table>
</tables>
And have the Ecom provider with the settings like that:

After running the import I am able to see the Top group as a root group under the NAV shop with two subgroups:

Our last version of the EcomProvider has the calls of the:
Ecommerce.Common.Application.KillAll();
Ecommerce.Services.Variants.ClearCache();
to clear the cache.
Could you try to use those methods instead of your own? Or Could you try to upgrade to the 9.7.2 and check if your issue is solved?

Sorry for the inconvenience.
Best regards, Dmitrij

 

You must be logged in to post in the forum