Set Up Cache Invalidation to Refresh Changes on the Website

Websites developed using Developer Extensions for Microsoft Dynamics CRM 2011 make heavy use of caching. As a result, changes made to Microsoft Dynamics CRM entities in the web application or in Microsoft Dynamics CRM Online may not immediately show up on the website. To resolve this, you can set up cache invalidation to happen automatically with the use of the web notification plug-ins and web notification URLs. To install web notification plug-ins, you must import a portal managed solution from the Customer Portal or the Partner Relationship Management Portal. For more information and links to these solutions, see Portal Developer Guide for Microsoft Dynamics CRM.
If the web notification plug-ins are installed, ensure that they are enabled for the solution.
Enable Web notification plug-ins
Next, create a new web notification URL (from the Settings menu) that goes to the cache invalidation handler of your website. The URL to your cache invalidation will be http(s)://your-website-domain/Cache.axd.
Web notification URL
Now, when entities are created, updated, or deleted, the cache invalidation handler for your website will be notified and will invalidate the necessary cache depending on what has changed.
Cache can also be invalidated manually by recycling the application pool, rebuilding the website in Microsoft Visual Studio, saving the web.config file, or by adding a browser toolbar button that will hit the cache invalidation handler. This will refresh the website with the Microsoft Dynamics CRM changes.
The toolbar script is a link or shortcut that is added into your browser favorites with the value for its URL as shown here.
In Internet Explorer, use this script:
javascript:var sURL=document.location.protocol + '//' +document.location.host;var oHttp=new ActiveXObject("Msxml2.XMLHTTP.6.0"); oHttp.Open('GET',sURL+'/Cache.axd?Message=InvalidateAll&d=' + (new Date()).valueOf(),false);oHttp.Send();window.location.reload(true);
In Firefox, use this script:
javascript:var%20url%20=%20document.location.protocol%20+%20'//'%20+%20document.location.host%20+%20'/Cache.axd?Message=InvalidateAll&d='%20+%20(new%20Date()).valueOf();%20var%20req%20=%20new%20XMLHttpRequest();%20req.open('GET',%20url,%20false);%20req.send(null);window.location.reload(true);
To use the script, just open the website you want to refresh and then click your favorite that you set previously. The cache for that website will be invalidated and you should see the changes you made.


Important Note....
Please recycle the CRM app pool in ISS. Once it restarted, it can start to notify to web portal.