Current filter:
                                You should refresh the page.

                                1 Solution

                                Creation Date Importance Sort by

                                To enable the model cache when the debugger is attached, override the WinApplication.GetModulesVersionInfoFilePath method. Its default implementation is the following:

                                [C#]
                                protected override string GetModulesVersionInfoFilePath() { if(System.Diagnostics.Debugger.IsAttached) { return null; } if(!string.IsNullOrEmpty(UserModelDifferenceFilePath)) { return Path.Combine(UserModelDifferenceFilePath, ModulesVersionInfoFileName); } return base.GetModulesVersionInfoFilePath(); }

                                You can override it as follows:

                                [C#]
                                protected override string GetModulesVersionInfoFilePath() { return Path.Combine(UserModelDifferenceFilePath, ModulesVersionInfoFileName); }

                                The cache is used when the ModulesVersionInfo file exists. This file is required to check if the cache is up-to-date.

                                > What would make the cache need to change in a production environment?

                                In the production environment, the cache is automatically updated when you deploy а new version (update the modules' DLLs).

                                • Alex Miller 05.26.2016

                                  Hi Konstantin,

                                  Thanks for your detailed answer and opening this ticket. I will test this in my development environment later today and write back here with results.

                                  About the cache change in production environment... This is what I hoped it would be. From my perspective, since this cache file will only change when I release new versions, it would be much better to provide this file in the resources along with my application. Just like the other xafml files and embedded as resources. Modifying the cache file is has dangerous as modifying the others module model.xafml files no? Do you think you could generate the cache an embed that file in the resources of XAF winform projects?

                                  Thanks!

                                  Alex

                                • Konstantin B (DevExpress) 05.26.2016

                                  Yes, we understand that the cache content should be protected from modifications. In the current XAF version we have decided to publish а simple file-based implementation of the model caching feature to estimate the performance impact and collect feedback from customers. We will certainly take your opinion into account when planning future improvements to this feature.