【问题标题】:CRM 2011 portal cachingCRM 2011 门户缓存
【发布时间】:2011-08-17 20:02:07
【问题描述】:

我们使用来自客户门户的代码开发了一个门户。但是我们还没有在 CRM 服务器上使用过客户门户解决方案。一切正常,除了缓存阻止更新显示在门户上。

在 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 年的缓存?

任何帮助或想法将不胜感激。

谢谢!

【问题讨论】:

    标签: dynamics-crm-2011


    【解决方案1】:

    确保您已配置缓存失效 URL。 PRM 门户有一项服务,可通过任何更新/创建事件(由在所有实体上注册的插件管理)使缓存无效。

    转到设置 -> Web 通知 URL,将 URL 更新到 Cache.axd 文件或创建一个新条目。

    如果一切就绪,我会确保负责调用缓存失效的插件正常工作/注册。

    希望有帮助

    【讨论】:

      【解决方案2】:

      有关 Web 通知 URL 的更多详细信息,请参阅以下文章。

      Set Up Cache Invalidation to Refresh Changes on the Website

      【讨论】:

        【解决方案3】:

        我发现从 URL 中删除 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>
        

        【讨论】:

          猜你喜欢
          • 2012-01-08
          • 2015-01-16
          • 2011-08-03
          • 1970-01-01
          • 2011-12-30
          • 1970-01-01
          • 2012-07-20
          • 1970-01-01
          • 2013-06-13
          相关资源
          最近更新 更多