Developer forum

Forum » Dynamicweb 9.0 Upgrade issues » Dynamicweb.Content.Caching.Cache.PurgeCache("ecom_catalog");

Dynamicweb.Content.Caching.Cache.PurgeCache("ecom_catalog");

Keld Gøtterup
Reply

I have been using Dynamicweb.Content.Caching.Cache.PurgeCache("ecom_catalog"); in DW8 but it gives an error in DW9

The type or namespace name 'Caching' does not exist in the namespace 'Dynamicweb.Content' (are you missing an assembly reference?)  

Is there a fix to this issue or is it not needed in DW9

 


Replies

 
Nicolai Pedersen
Reply
This post has been marked as an answer

Try this one:

foreach (string key in Dynamicweb.Caching.Cache.Current.AllKeys) {
    if (key.StartsWith("eCom", StringComparison.InvariantCultureIgnoreCase)) {
        Dynamicweb.Caching.Cache.Current.Remove(key);
    }
}

Votes for this answer: 1

 

You must be logged in to post in the forum