Skip to main content
All docs
V25.1
  • CachedReportSourceBase.PageCacheSize Property

    Specifies the page cache size.

    Namespace: DevExpress.XtraPrinting.Caching

    Assembly: DevExpress.Printing.v25.1.Core.dll

    NuGet Package: DevExpress.Printing.Core

    Declaration

    [DefaultValue(0)]
    public int PageCacheSize { get; set; }

    Property Value

    Type Default Description
    Int32 0

    An integer that specifies the cache size.

    Remarks

    Large reports on Linux OS consume more memory compared to Windows due to images used within a report. Even when images are duplicated, each image is stored in memory as a separate instance. The PageCacheSize property allows you to enlarge the image cache size and reduce memory consumption. Set this property to a small value (2-5) if your report page contains multiple images.

    Example

    public class CustomViewerOperationLogger : WebDocumentViewerOperationLogger {
      public override void CachedDocumentSourceSerializing(string documentId, CachedDocumentSource cachedDocumentSource,
        GeneratedDocumentDetails documentDetails, DocumentStorage documentStorage,
      PrintingSystemBase printingSystemSource) {
        cachedDocumentSource.PageCacheSize = 5;
      }
    
      public override void CachedDocumentSourceDeserialized(string documentId, CachedDocumentSource cachedDocumentSource,
      GeneratedDocumentDetails documentDetails, DocumentStorage documentStorage) {
        cachedDocumentSource.PageCacheSize = 5;
      }
    }
    
    See Also