Developer forum

Forum » Development » How to clear cached product group relations in eCommerce

How to clear cached product group relations in eCommerce

Allan Iversen
Reply

Hi,

 

 
I got a question regarding cached product group relations in the eCommerce. I am importing new product group relations and I want to remove the old ones - maybe using the StorageManager for this - but its an internal class.

1
Dynamicweb.Content.Caching.StorageManager
like:
1
StorageManager.Current.GetStorage("eCommerce").Remove("ProductGroupRelations");


Is it possible for us to invoke this?

 

 

- Allan


Replies

 
Jeppe Eriksson Agger Dynamicweb Employee
Jeppe Eriksson Agger
Reply

Hi Allan,

 

Currently, the cache clearing is done on a product-by-product basis which makes it harder for you to solve, also the ClearCache methods are marked as private. They are called by Save, Delete and DetachFromGroup -- all of which are public -- so it's possible to work around this. However, it's not really recommended to do.

 

I have added a feature request to our backlog to change the access modifier of these methods to to public and add a ClearAllCache method. The item number is #14258.

 

- Jeppe

 
Allan Iversen
Reply

Hi Jeppe,

When do you think access modifier for ClearCache is changed? In the meanwhile, I will try to come up with something.

- Allan

 
Jeppe Eriksson Agger Dynamicweb Employee
Jeppe Eriksson Agger
Reply

This is currently slated for release with the next hotfix for 8.3.1, called 8.3.1.17. I don't currently have a release time for this, but I would imagine either this week or start next week.

 

- Jeppe

 

You must be logged in to post in the forum