Developer forum
E-mail notifications
Clear cache
We've set up caching of product groups on a solution to improve performance. However, we would like to be able to flush the cache when products change either through the UI or our integration.
There are some methods for clearing cache in Dynamicweb.eCommerce.Common.Application, but none of these indicate that they clear this particular cache.
Any suggestions?
BR.
Lars
Replies
Other wise loop through the keys in system.web.cache and remove everything where key starts with eCom:ProductList
Hi Nicolai
Is there somewhere that we can see all those "secret" URL commands to clear cache and optimize from frontend?
I remember you showed me some command ecomcacheclear? or something?
I also need a command from frontend to clear all XML generated content, sessions and so on.
Thanks
Peter
Hi Peter
The only ones doing stuff on the cache (that I remember) are these 2:
ClearCache=1
refresh=yes
There are no cached generated XML and there is no parameter that will remove all sessions, except /Admin/Public/ExtranetLogoff.aspx
BR Nicolai
Hi Nicolai,
Those are really "ninja tricks" - which I at DWTC14 got the impression we should avoid.. ;-)
They are razor sharp ninja tricks which I think can potentially hurt most Dynamicweb solutions, if someone bad ninja attacks your site with those extra queryparameters. My suggestion is therefor: Only let them functional if the user is Administrator (logged in backend as administrator).
A Related question...
Speaking about caching, why is the cache not deleted if someone manually sorts products in eCommerce? The sorting of products will only take affect in frontend after caching has been deleted. It gives a feeling of something not working for the editor when he/she manually sorts products and then in frontend - nothing happens. Please could you fix it? :-)
Med venlig hilsen/Best regards,
Sten Hougaard
Webudvikler
A: København/Aarhus . W: www.1stweb.dk
@: netsi1964
Hi Nicolai,
Is removing cache from system.web.cache still a viable approach in DW 9.6?
If not - how would we go about purging a particular ecom order from cache?
-- Lamar
Hi Lamar
DW9 does uses its own caching API that utilizes System.Net caching.
On the orderservice you can call RemoveOrderCache(orderid) to delete an order from the cache.
BR Nicolai
You must be logged in to post in the forum