Current filter:
                                You should refresh the page.
                                  • [DevExpress Support Team: CLONED FROM T716333: MVC Dashboard - How to disable the built-in caching mechanism]

                                    Hi.

                                    We applied imlementation in this article reccomended by you :
                                    https://www.devexpress.com/Support/Center/Question/Details/T520250/web-dashboard-how-to-manage-an-in-memory-data-cache-when-the-client-data-processing-is
                                    to solve the issue with dashboard cache problem described in ticket :
                                    https://www.devexpress.com/Support/Center/Question/Details/T716333/mvc-dashboard-how-to-disable-the-built-in-caching-mechanism#answer-99b36a55-7449-4af1-a6c8-89573b7731ce

                                    we implemented the steps as follows :

                                    • Implemented clear cache mechanism, which is triggered on Logout / Login
                                    - Implemented CacheManager :

                                      public static class CacheManager
                                      {
                                            public static void ResetCache()
                                            {
                                                if (HttpContext.Current.Session != null)
                                                {
                                                    HttpContext.Current.Session["UniqueCacheParam"] = Guid.NewGuid();
                                                }
                                            }
                                            public static Guid UniqueCacheParam
                                            {
                                                get
                                                {
                                                    if (HttpContext.Current.Session == null)
                                                    {
                                                         return Guid.Empty;
                                                    }
                                                    else
                                                    {
                                                        if (HttpContext.Current.Session["UniqueCacheParam"] == null)
                                                           ResetCache();
                                                        return (Guid)HttpContext.Current.Session["UniqueCacheParam"];
                                                    }
                                                }
                                            }
                                      }

                                    - On Logout / Login -> ResetCache() is called

                                          public void ResetCache()
                                          {
                                             CacheManager.ResetCache();
                                          }

                                    • Implemented e.Parameters.Add(new DashboardParameter("Param1", typeof(Guid), CacheManager.UniqueCacheParam));
                                    • js : On berforerender -> dashboardControl.refresh() is called

                                    When removing or adding columns in the datasource
                                    the change is not applied in the dashboard designer after exectuing Logout / Login.

                                    What could be the possible reason ?
                                    Should I give you details on how we are implementing the datasource loading ?

                                Show all comments
                                • Sergi (DevExpress Support) 12.01.2019

                                  Hello Alex,

                                  It is unclear why the approach from the Web Dashboard - How to manage an in-memory data cache when the Client data processing is used article does not work in your case.

                                  I need to research the issue locally to determine the cause of the problematic behavior. Would you please try to create a small sample project to demonstrate the issue? I will do my best to help you find the most suitable solution.

                                • Alex.Ivanov 12.05.2019

                                  Hi,
                                  We developed the case with SQL database with exactly the same implementation, but
                                  unfortunatelly we couldn't reproduce the issue. When reset cache mechanasim is called
                                  the issue doesn't appear. When the underlying datasource table is altered the change
                                  is applied in dashboard properly. A sample solution 'DashboardDataSourceCacheIssue'
                                  is attached to illustrate the approach we use for datasource loading.

                                  SOLUTION DETAILS

                                  It contains following projects :

                                  • DashboardDataSourceCacheIssue : Dashboard MVC web application - sample application with dashboard
                                  • Db folder contains :
                                    - Db\dashboard_cache_issue.mdf -> SQL database with 4 tables
                                    - Db\DbAdmin.exe - simple desktop application, which can be used for altering the database tables.
                                  • Common.dll assembly which contains the main logic

                                  TEST SCENARIO

                                  0 . Start DashboardDataSourceCacheIssue dashboard app.
                                  1 . Drop grid widget on the canvas
                                  2 . Select datasource A/A-54AE which refers to table dbo.ICUBE_1 in database
                                  3 . Click 'Add Column' button and observe the columns under 'BINDING' section
                                  4 . With DbAdmin.exe tool do :
                                      4.1 press CONNECT link button
                                  4.2 select table ICUBE_1
                                  4.3 add|delete new|existing column in 'EDIT TABLE' tab

                                  5 . In DashboardDataSourceCacheIssue press 'Refresh' button in upper left corner
                                  6 . Repeat steps from 1 to 3 ->
                                      result : columns under 'BINDING' section are updated as expected,
                                      and NOT updated when database is Oracle (implementation is the same)

                                  QUESTIONS

                                  Q1 : Can you create sample Dashboard MVC project which implemenents our approach for
                                       datasource loading and also consumes data from oracle database  to reproduce or fix the issue ?
                                  Q2 : Can we schedule a remote meeting via skype to discuss the problem if any further information is needed ?

                                  Thanks in advance.

                                  Regards,
                                  Alex

                                • Eugene Le. (DevExpress) 12.06.2019

                                  Thank you for providing the sample application.
                                  The field list is not refreshed on the client side when the refresh() method is called. To refresh the field list, it is necessary to reload the dashboard by calling dashbardControl.loadDashboard(dashbardControl.getDashboardId()) . Please try this approach and let me know whether it helped or not.

                                • Alex.Ivanov 12.12.2019

                                  Hi,
                                  This approach doesn't work.

                                  TEST SCENARIO :
                                  1 . Initially we have 6 columns in the given table
                                  2 . We reduce columns to 2
                                  3 . Cross check the columns count in Toad app -> verified 2
                                  4 . After Logout / Login we load the same dashboard and start editing it.
                                  5 . Result : we have updated 2 columns in datasource as expected

                                  6 . We repeat the same steps from 2 to 6, but now we add 2 more columns
                                       expecting that there will be 4 columns.
                                  7 . Result : only 2 columns are presented

                                  See the attached video 'explanatory_video.m4v' .

                                  Regards,
                                  Alex

                                • Stason (DevExpress Support) 12.12.2019

                                  Hello Alex,

                                  Our Dashboard caches data on the server and the field list on the client side so that you need to reset the cache on the server and client side.

                                  I see that you are calling the AJAX request to get the dashboard id. However it is not required to do this. You need to reset the cache on the server as you already did previously.
                                  Then, call the client-side dashbardControl.loadDashboard method and pass the dashboard id gathered from the client-side dashbardControl.getDashboardId method without the refresh method. The loadDashboard method will refresh the dashboard as required.

                                • Alex.Ivanov 12.13.2019

                                  Hi,
                                  1 . I am using ajax, becau se dashbardControl.getDashboardId() returns null. refresh() method is not used anymore.
                                  2 . When ajax is called the ResetCache() is called also (On every dashboard edit action)
                                  3 . Columns are still not updated.

                                  Please see the attached video..

                                • Stason (DevExpress Support) 12.13.2019

                                  Thank you for your clarification Alex. I see the issue on your video and need additional time to reproduce it on my side and research it. I will get back to you once I get any news.

                                • Stason (DevExpress Support) 12.17.2019

                                  Hello Alex,

                                  When analyzing the issue in your video and sample, I tried to isolate the problem in a simple project. It all works fine on my side. I use a simple button to reset the cache and then reload the dashboard. Please check my project and video in the attachment.
                                  The only thing I noticed in your video is that you use the BeforeRender event to reset the server and the client cache for a certain dashboard. I see that you load the dashboard from your custom menus and then reset the cache. In this case, it is not required to reset the client cache. I suggest you try resetting the server cache variable (for this, call the ResetCache method of the DashboardCacheManager class) before opening a dashboard. For example, you can do it on a menu item click (not in the BeforeRender event handler) and then you can open the binding panel to see new fields.
                                  If this approach doesn't help, please modify my sample to illustrate the problem. I will look into it and do my best to help you.

                                • Alex.Ivanov 01.06.2020

                                  Hi Stason,

                                  1 . The ResetCache() method previously was called only on Login and this action is explicitly invoked by the user.
                                       The client cache clearing was not implemented. The additional calling of the method was made just for testing.
                                  2 . I provided mockup project in previos comment (here in the ticket history) , where I pointed out that the issue
                                       cannot be reproduced with MSSQL database. The only way to reproduce it is to create the same mockup with oracle database behind.

                                  I reworked the mockup I created previously, to use oracle database now.

                                  How to run it :
                                  1 . Specify in Web.config appSettings -> Server value to be the server oracle instance name (in my case it is release_test_alex)
                                  3 . After the project is ran, the authentication against oracle is done in Global.asax
                                       with user:scott, pass:tiger
                                  3 . The initial screen contains several buttons in the top left and a dashboard designer.
                                  4 . Click 'Re-create data' button. This will create 4 tables on the oracle server :
                                      "Dashboard","Datasource","ICUBE1","ICUBE2"
                                  5 . Select grid widget and configure datasource (A-54AE), and columns
                                  6 . Press "Add new Column to ICUBE1" button, which will add new column to ICUBE1 table
                                       A-54AE-ICUBE1 datasource is using ICUBE1 table.
                                  7 . Press "Clear Cache" button.
                                  8 . Repeat step 5. Result is : the new column is not shown.
                                      The only way to see the changes is to restart the application.

                                  A detailed video and sample project are attached.

                                • Sergi (DevExpress Support) 01.07.2020

                                  Hi Alex,

                                  Thank you for your sample. We're working on this and will update this ticket once we have any news to share. We appreciate your patience.

                                1 Solution

                                Creation Date Importance Sort by

                                Hello Alex,

                                I greatly appreciate your time while I was looking into this case.
                                I could not start your application and tried to update all the packages. However, I found that the DevArt Provider is used and faced the following error on an attempt to load a dashboard:
                                "Cannot obtain Oracle Client information from registry. Make sure that Oracle Client Software is installed and that the bitness of your application (x64) matches the bitness of your Oracle Client, or use the Direct mode of connecting to a server."

                                The Dashboard Suite uses the eXpress Persistent Objects library to read data from a database. I am afraid the current version of the XPO library does not support Devart's dotConnect data provider.
                                I also noticed that you customized the connection string and thus the dashboard could get data in your real application. However, in such cases correct operation of our dashboard is not guaranteed.

                                I suggest you use another Oracle Provider like the ODP Managed data provider. Does the problem occur with this provider on your side? I look forward to your results.

                                • Alex.Ivanov 01.10.2020

                                  Hi Stason,
                                  1 . You can not update the packages, because most of them are static references to DevExpress assemblies, you have to do add those
                                       references manually. I couldn't send you the reference, because of the size limitation of the attachment.
                                  2 . Regarding error : "Cannot obtain Oracle Client ..."
                                       - the project platform target should be set as x64.
                                       - I noticed issues under vs 2017 community edition. With vs 2015 Professional ed. is working fine.
                                  3 . Please explain me this : "current version of the XPO library does not support Devart's dotConnect data provider"
                                       - since on my side I am accessing the oracle database without any issues.
                                       - ConnectionProvider doesn't have any dependency to Devart implementation. The only place where Devart usage is utilized is in
                                         implementation of DashboardStorage class, through Common assembly.
                                       - I don't understand how choosing custom data provider library (in our case Devart) will affect Dashboard caching. If you refering to
                                         Web.config entry :       <system.data>
                                              <DbProviderFactories>
                                                    <add name="dotConnect for Oracle" ....
                                              </DbProviderFactories>
                                          </system.data>
                                           it isn't used actually and you can delete it.
                                           The devart usage is capsulated only in Common assembly.

                                  4 . Regarding "...you customized the connection string and thus the dashboard could get data in your real application. However, in such cases correct operation of our dashboard is not guaranteed."
                                       if you refering the part from Web.config
                                        <connectionStrings>
                                           <add name="DefaultConnection" ... />
                                           <add name="NWindConnectionString" .../>
                                        </connectionStrings>
                                        it is not used also and you can delete it.

                                  Please try to run the sample project and see the case explained in the attached video in previous message.

                                  Regards,
                                  Alex

                                • Stason (DevExpress Support) 01.13.2020

                                  Hello Alex,

                                  I ran the application in VS 2015 Pro and got a similar result as in VS 2017 Pro.
                                  I faced the following issue: "Cannot obtain Oracle Client information from registry. Make sure that Oracle Client Software is installed and that the bitness of your application (x64) matches the bitness of your Oracle Client, or use the Direct mode of connecting to a server."

                                  The bitness of your main application is x64. The Common application is untouched and even if I change the bitness to x64, I see the same error.
                                  We are not working with dotConnect for Oracle in our company and I installed dotConnect for Oracle 9.10 Express.
                                  I have attached the modified version of your application. Please review it and let me know what steps I missed on an attempt to start your application.
                                  If your application uses the devArt dotConnect provider only in your custom Common application, I would still greatly appreciate it if you prepare a sample project without using this provider. Moreover when you try to prepare a sample, you may find an issue that influences the case and can fix it faster.