2011-08-17 53 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>