Back to Devexpress

DefaultWebDocumentViewerContainer.UseEmptyStoragesCleaner() Method

xtrareports-devexpress-dot-xtrareports-dot-web-dot-webdocumentviewer-dot-defaultwebdocumentviewercontainer-123c1acc.md

latest3.2 KB
Original Source

DefaultWebDocumentViewerContainer.UseEmptyStoragesCleaner() Method

Replaces a service that is used to clean the report and document storage with an empty service, avoiding automatic cleaning of this storage.

Namespace : DevExpress.XtraReports.Web.WebDocumentViewer

Assembly : DevExpress.XtraReports.v25.2.Web.dll

NuGet Package : DevExpress.Web.Reporting.Common

Declaration

csharp
public static void UseEmptyStoragesCleaner()
vb
Public Shared Sub UseEmptyStoragesCleaner

Remarks

According to the time settings specified in the CacheCleanerSettings and StorageCleanerSettings classes, the default cleaner service periodically checks if the cache and file storage (FileReportStorage, FileDocumentStorage and FileExportedDocumentStorage) contain reports/documents/exported documents whose lifetime exceeds a specific amount of time. If such reports/documents/exported documents are found, they are deleted. Call the UseEmptyStoragesCleaner method to register an empty storage cleaner instead of the default one, so that documents are not removed automatically.

csharp
using DevExpress.XtraReports.Web.WebDocumentViewer;
// ...

protected void Application_Start(object sender, System.EventArgs e) {
    // ...
    DefaultWebDocumentViewerContainer.UseEmptyStoragesCleaner();
}
vb
Imports DevExpress.XtraReports.Web.WebDocumentViewer
' ...

Sub Application_Start(ByVal sender As Object, ByVal e As EventArgs)
    ' ...
    DefaultWebDocumentViewerContainer.UseEmptyStoragesCleaner()
End Sub

See Also

StorageCleanerSettings

CacheCleanerSettings

DefaultWebDocumentViewerContainer Class

DefaultWebDocumentViewerContainer Members

DevExpress.XtraReports.Web.WebDocumentViewer Namespace