Hi Francois,
Thank you for your update.
We were unable to reproduce the issue with the provided details. We have shared the sample with the Redis in which we have tried to reproduce the issue in the below link,
Note: Kindly run the web service project first and provide that URL to the serviceUrl.
Also, the reported issue may occur due to the Memory Cache in production environment. However, we can resolve this by using the IDistributedCache in our PDF Viewer Controller. Kindly follow the below steps for using the Redis Cache,
Kindly follow the below steps for using the Redis Cache,
STEP 1: To use Redis cache in PDF Viewer service, install the following NuGet package,
STEP 2: To configure the Redis cache in PDF Viewer service, you have to add the following changes in Startup.cs
|
services.AddMemoryCache();
services.AddDistributedRedisCache(options =>
{
options.Configuration = Configuration.GetConnectionString("Redis");
}); |
STEP 3: We have to use IDistributedCache instead of IMemoryCache in PdfViewerController.cs. Please find the PDF Viewer service sample and code snippet below.
|
PdfViewerController.cs
private IDistributedCache _cache;
public PdfViewerController(IHostingEnvironment hostingEnvironment, IDistributedCache cache)
{
_hostingEnvironment = hostingEnvironment;
_cache = cache;
} |
Please try it and if you still have concerns, revert us with the modified sample with replication procedure, PDF Document , Essential Studio Version. These details will be helpful for us to investigate further and assist you better.
Regards,
Akshaya