Redis Configuration

Hi Team,

Can you please share the documentation on how to use redis cache in bold reports 


1 Reply

SS Sathishkumar Saravanan Syncfusion Team July 8, 2025 11:29 AM UTC

Hi there,

Thank you for reaching out to Bold Reports support.

The Bold Reports officially support file-base caching as outlined in the documentation below.
Document link: Enable Distributed cache in Report Viewer | ASP.NET Core

We have prepared and attached a sample to store report bytes in the Redis cache, following the documentation below for your reference:

https://codewithmukesh.com/blog/redis-caching-in-aspnet-core/

 
This implementation involves storing the report bytes into the Redis cache.

This sample shows how you can:

  • Use Redis to cache report definitions or rendered output
  • Improve performance by reducing redundant processing
  • Customize the caching logic to suit your infrastructure

Please find the sample attached for your reference.

Guidelines:

1. Please inherit the IReportHelperSettings interface in your report viewer controller, as shown in the attached snap.

Image_6156_1751974108829

 

2. Implement the interface methods as demonstrated in the attached snap.

Image_3153_1751974108829

 

3. Set up the storage provider settings as follows:

 

helperSettings.StorageSettings = new Models.CacheStorageSettings(dssCache);
helperSettings.StorageSettings.Provider = StorageProvider.File;
helperSettings.StorageSettings.ItemTypes = StorageItemTypes.Report;


Image_4692_1751974108829

 

4. Add the CacheStorageSettings class to your application with the same namespace. The CacheStorageSettings class is included in the attached sample application. In this class file, you get the GetBytes, SetBytes, and Delete override methods. Here you can handle the cache details in your preferred type.

GetBytes
Based on the key and module type, get the cache data in your database.
public override byte[] GetBytes(string key, string storageModelType)
{// Get the Redis cache implementation here.
}

SetBytes
public override void SetBytes(string key, byte[] value, string storageModelType)
{ // Add the Redis cache implementation here.
{
You receive the values, key, and storage module type. Based on the key and module type, store the cache data in your database.

Delete 
Delete the report cache when we close the report viewer.
public override void Delete(string key)
 {
 // Delete the cache file.
}




Let us know your concerns.


Attachment: Redis_CACHING_ReportViewer_Core_a56b5e93.zip

Loader.
Up arrow icon