The requested page is not available for the requested platform. You are viewing the content for Default platform.

CacheCleanerSettings Class

Provides time settings to clean a cache for storing documents and reports.

Namespace: DevExpress.XtraReports.Web.WebDocumentViewer

Assembly: DevExpress.XtraReports.v19.1.Web.dll

Declaration

public class CacheCleanerSettings :
    StoragesCleanerSettingsBase
Public Class CacheCleanerSettings
    Inherits StoragesCleanerSettingsBase

Remarks

According to the time settings specified in the CacheCleanerSettings class, the default cleaner service periodically checks if the memory cache contains documents/reports whose lifetime exceeds a specific amount of time. If such documents/reports are found, they are deleted. You can register a new instance of the CacheCleanerSettings class with required time settings using the DefaultWebDocumentViewerContainer.Register<T, TImpl> (.NET Framework)/ AddSingleton (.NET Core) method.

The following code demonstrates how to register custom settings in a .NET Framework application.

using DevExpress.XtraReports.Web.WebDocumentViewer;
//... 
  void Application_Start(object sender, EventArgs e) {
    var dueTime = TimeSpan.FromSeconds(30);
    var period = TimeSpan.FromSeconds(30);
    var reportTimeTolive = TimeSpan.FromSeconds(30);
    var documentTimeToLive = TimeSpan.FromSeconds(30);
    DefaultWebDocumentViewerContainer.RegisterSingleton<CacheCleanerSettings>(new CacheCleanerSettings(dueTime, period, reportTimeTolive, documentTimeToLive));
  }
//...

The following code demonstrates how to register custom settings in a .NET Core application.

using DevExpress.AspNetCore;
using DevExpress.AspNetCore.Reporting;
//... 

public class Startup {
//... 
  public void ConfigureServices(IServiceCollection services) {
    services.AddDevExpressControls();
    services.AddMvc(); 

    var dueTime = TimeSpan.FromSeconds(30);
    var period = TimeSpan.FromSeconds(30);
    var reportTimeTolive = TimeSpan.FromSeconds(30);
    var documentTimeToLive = TimeSpan.FromSeconds(30);
    services.AddSingleton<CacheCleanerSettings>(new CacheCleanerSettings(dueTime, period, reportTimeTolive, documentTimeToLive));
    });        
  }
//...    
}

Inheritance

Object
DevExpress.XtraReports.Web.WebDocumentViewer.Native.Services.StoragesCleanerSettingsBase
CacheCleanerSettings
See Also