'Declaration Public ReadOnly Property Cache As ReportCache
public ReportCache Cache {get;}
'Declaration Public ReadOnly Property Cache As ReportCache
public ReportCache Cache {get;}
The report cache is one of the most powerful features in the C1ReportViewer control. By default, every time the control renders a report, it compresses the resulting Html stream and stores it in the System.Web.UI.Page.Cache object. If the same report is requested again, the control simply fetches it back from the cache and sends it directly to the client. This results in fast response times and consumes little memory (because the reports are cached in compressed form).
The control is smart enough to detect changes to the report definition and keep track of different versions in the cache. It also detects changes to the report definition file and discards old reports from the cache.
The cache object itself is provided by the ASP.NET framework (System.Web.UI.Page.Cache property), and can be set up to match your server configuration, including Web Farm scenarios.
The C1.Web.Wijmo.Controls.C1ReportViewer.ReportService.ReportCache object allows you to disable the cache, specify time out values, and add dependencies (to data source files for example).
// enable cache _c1wr.Cache.Enabled = true; // cached reports expire after one hour _c1wr.Cache.Expiration = 60; // renew one-hour limit whenever a report is retrieved from the cache _c1wr.Cache.Sliding = true;