2011-08-17 93 views
3

我們使用客戶門戶代碼開發了一個門戶。但我們還沒有在CRM服務器上使用客戶門戶解決方案。一切工作正常,除了緩存阻止更新顯示在門戶網站上。CRM 2011門戶緩存

在CRM 4中,我使用了這個解決方案http://pogo69.wordpress.com/2010/11/05/caching-revisited-crm-4-0-sdk-advanced-developer-extensions/。但是這在CRM 2011中不起作用,因爲Microsoft.Xrm.Client.Caching是不同的。如何清除2011年的緩存?

任何幫助或想法將不勝感激。

謝謝!

回答

1

確保您已配置緩存失效URL。 PRM門戶有一項服務,該服務使任何更新/創建事件(由在所有實體上註冊的插件管理)的緩存失效。

轉到設置 - > Web通知URL,將URL更新爲Cache.axd文件或創建一個新條目。

如果這一切都到位,我會確保負責調用緩存失效的插件正常工作/註冊。

希望幫助

0

我發現,去除網址preloadcache參數&值繞過CRM的緩存。不理想,但它的工作。您的里程可能會有所不同...

<script type="text/javascript"> 
     bypassCrmPreloadCache(); // DE_WR_15706 Bypass 30sec cache to get latest version # 


     function bypassCrmPreloadCache() { 
      var ParentURL = window.parent.location.href; 
      var nStartPreloadcache = ParentURL.indexOf("preloadcache"); 
      if (nStartPreloadcache > 0) { 
       // Parent URL is cached 
       var nEnd = ParentURL.indexOf("&", nStartPreloadcache); 
       if (nEnd == -1) { // Special case: no ampersand => preloadcache is last argument. 
        nEnd = ParentURL.length; // End of URL is end of preloadcache's value.  
       } 
       var strPreloadCacheParamAndValue = ParentURL.substr(nStartPreloadcache, 1 + nEnd - nStartPreloadcache); 
       // Remove preloadcache-parameter from URL 
       ParentURL = ParentURL.replace(strPreloadCacheParamAndValue, ""); 
       if (ParentURL.charAt(ParentURL.length-1) == '&') 
        ParentURL = ParentURL.slice(0, -1); // Ensure URL not terminated by an unnecessary '&'. 

       // Load URL in parent Window, bypassing the cache 
       window.open(ParentURL, "_parent"); 
      } 
     } 
</script>