Caching Report keeps on creating the same cache folder and data even after report is closed

0 Answers 150 Views
Report Viewer - ASP.NET
Samer
Top achievements
Rank 1
Samer asked on 25 Mar 2022, 09:37 AM

I have an issue with Telerik reporting.

I have set the caching to be on file. However, when generating large reports, the Cache folder keeps on recreating folder with all the cache items ( more than 10,000), and even if the report is closed on the browser, the cache folder keeps on being recreated every while.

 

Is there a way we can stop this or if we can stop caching ?

Neli
Telerik team
commented on 30 Mar 2022, 08:08 AM

Hi Samer,

When you use FileStorage, our REST Service generates a structure of folders and files that keeps the state of each client/viewer that uses the service. Periodically, the assets get cleaned by the service. How long a client will be kept alive depends on the REST Service properties ClientSessionTimeout - see the article HTML5 Report Viewer and Reporting REST services.

Periodically (each 5 min), the Rest Service performs cleaning of the expired sessions. Note that in order for the service to clean the inactive sessions it has to be awakened by a request from an active client/viewer. Hence, all inactive sessions will be deleted after some time that is determined by the ClientSessionTimeout and the time intervals in which the inactive sessions get removed from the service, provided the service is awake.

If the service stops before the client sessions have been deleted (including before it has been awakened to delete them), the uncleaned sessions will remain in the Storage. The data will be useless, but it will not be removed as the REST Service has already stopped before there has been a request to awaken it and let it automatically clean the expired storage data. In such cases, you need to manually clean the storage. That said, you need to delete manually the folder C:\WINDOWS\Temp\Html5App each time the REST Service stops. This way, you will remove the leftovers and prevent the unnecessary increase of occupied storage. While the REST Service runs normally, it takes care of its expired assets and the cleaning happens automatically.

You may consider testing IStorage implementation suitable for deploying both on single instance application hosting and in Web Farms.

 

If you attach a Trace Listener to the REST Service application, it logs information on deleting the expired resources from the storage:

Cache Cleanup (2/21/2022 1:17:36 PM): 'Delete expired cache assets' should be performed as of 2/21/2022 9:17:35 PM, as it is not performed since 2/21/2022 9:11:21 PM and the check period is 00:05:00
Cache Cleanup (2/21/2022 1:17:36 PM): Staring to execute 'Delete expired cache assets'
Cache Cleanup (2/21/2022 1:17:36 PM): Staring to execute 'Delete expired clients'
Cache Cleanup (2/21/2022 1:17:36 PM): 2 clients survived expiration, namely: d94601ce16d, 2086a92a480
Cache Cleanup (2/21/2022 1:17:36 PM): Finished executing 'Delete expired clients'; elapsed: 00:00:00.0084083
Cache Cleanup (2/21/2022 1:17:36 PM): Staring to execute 'Delete expired refreshes & instances'
Cache Cleanup (2/21/2022 1:17:36 PM): Finished executing 'Delete expired refreshes & instances'; elapsed: 00:00:00.0064359
Cache Cleanup (2/21/2022 1:17:36 PM): Finished executing 'Delete expired cache assets'; elapsed: 00:00:00.0276051

No answers yet. Maybe you can help?

Tags
Report Viewer - ASP.NET
Asked by
Samer
Top achievements
Rank 1
Share this question
or