We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. (Last updated on: November 16, 2018).
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

How to enable/disable client-side cache in Dashboard Viewer using JavaScript API

Client-side cache stores the filter interactions data in the cache. If the same interaction is performed again, then data will be fetched from the cache. By default, the client-side cache is enabled for the Dashboard Viewer. It can be disabled/enabled at the SDK level using the enableClientSideCache API.

To disable the client-side cache, use the following code snippet.

$("#container").ejDashboardViewer({

       enableClientSideCache: false

     });

 

When the client-side cache is enabled, you can specify the number of requests to be cached. Also, you can enable the cleanup of the cache in the specified interval using the cacheSettings API.

Find the following code snippet to enable the client-side and set the cache settings.

$("#container").ejDashboardViewer({    

       enableClientSideCache: true, 

        cacheSettings: {

            enableAutoCleanup: true,

           capacity: 50,

           cleanupInterval:20,

        }

     });

 

Where, enableClientSideCache enables the caching behavior.

        capacity specifies the number of requests to be cached. If the request count exceeds the capacity, then the old cached items will be replaced with new ones.

         enableAutoCleanUp specifies whether to automatically clear the client-side cached data in specific intervals.

         cleanupInterval specifies the time interval in minutes to clear the cache.

 

Article ID: Published Date: Last Revised Date: Platform: Control:
9206 08/24/2018 08/27/2018 Dashboard Platform Dashboard SDK
Did you find this information helpful?
Add Comment
You must log in to leave a comment

Warning Icon You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.Close Icon