StorageCleanerSettings Class

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

Namespace: DevExpress.XtraReports.Web.WebDocumentViewer

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

Syntax

public class StorageCleanerSettings :
    StoragesCleanerSettingsBase

According to the time settings specified in the StorageCleanerSettings class, the default cleaner service periodically checks if the file storage contains documents/exported documents/reports whose lifetime exceeds a specific amount of time. If such reports are found, they are deleted. You can register a new instance of the StorageCleanerSettings 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);
    var exportedDocumentTimeToLive = TimeSpan.FromSeconds(30);
    DefaultWebDocumentViewerContainer.RegisterSingleton<StorageCleanerSettings>(new StorageCleanerSettings(dueTime, period, reportTimeTolive, documentTimeToLive, exportedDocumentTimeToLive));
  }
//...

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().AddDefaultReportingControllers(); 

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

Inheritance

Object
DevExpress.XtraReports.Web.WebDocumentViewer.Native.Services.StoragesCleanerSettingsBase
StorageCleanerSettings

Inherited Members

System.Object.ToString()
System.Object.Equals(System.Object)
System.Object.Equals(System.Object, System.Object)
System.Object.ReferenceEquals(System.Object, System.Object)
System.Object.GetHashCode()
System.Object.GetType()
System.Object.MemberwiseClone()

See Also