Hi Team,
Can you please share the documentation on how to use redis cache in bold reports
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:
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.
2. Implement the interface methods as demonstrated in the attached snap.
3. Set up the storage provider settings as follows:
helperSettings.StorageSettings = new Models.CacheStorageSettings(dssCache); |
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. |
| SetBytes | 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. |
Let us know your concerns.