New CS09 Sites & Cache Refresh

One of the little snags I encountered recently while building out a new Commerce Server demo, was a problem with refreshing the site caches.

Creating a new eCommerce-enabled site in SharePoint is one of the real added bonuses of using SharePoint Commerce Services. But what if you want to Commerce-enable an existing SharePoint site or site collection? The best way to do this for a new site is to use the SharePoint Commerce Services Configuration Wizard provided with Commerce Server 2009.

SharePoint Commerce Services Config Wizard

What if you didn’t create your site using the wizard and want to enable eCommerce functionality on an existing SharePoint site?  Or you don’t want to create a new Commerce Server site as the wizard suggests?  If you look at the Commerce Server Manager you’ll notice that your existing SharePoint sites don’t show up in the applications list.

Commerce Server Manager

This means that even if you configure Commerce Server features correctly, a refresh site cache won’t actually refresh the data on your existing SharePoint sites.  A quick fix to this is to use a URL, appending the name of the cache  you want to refresh:

http://<newsitehostname>/SiteCacheRefresh.axd?CacheToRefresh=advertising

http://<newsitehostname>/SiteCacheRefresh.axd?CacheToRefresh=CatalogCache

http://<newsitehostname>/SiteCacheRefresh.axd?CacheToRefresh=discounts

The better approach is certainly to use the setup wizard, but if you find yourself trying to get rid of cached data even after refreshing the caches from the business tools, then this is a quick alternative.

This entry was posted in e-Commerce and tagged , . Bookmark the permalink.

One Response to New CS09 Sites & Cache Refresh

  1. mzzm says:

    I’ve run into this issue many times and continue to used the url’s as you’ve explained. There has got to be a better way to add the applications after the face, yet I haven’t dug into it enought. Anyone done this successfully?

Leave a Reply

Your email address will not be published. Required fields are marked *

*

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>