Search

Atalasoft Knowledge Base

INFO: Why aren't the images in the server cache being deleted? (Legacy Web Controls)

Administrator
DotImage

Legacy Controls NOTICE

This article references our legacy Web Forms Web Viewing controls (WebImageViewer, WebAnnotationViewer, WebThumbnailViewer). It is preserved for archival purposes, but support strongly recommends using our modern HTML5 web controls: WebDocumentViewer, WebDocumentThumbnailer instead)

INFO: WebDocumentViewer Whitepaper - Getting Started With Web Viewing

Main Article Content

Because of the nature of session state and components, it was impossible to tell ASP.NET if the web browser had been closed, or the session had expired. This can be done outside of a component, but the goal was to keep as much inside the control as possible.

In order to delete the old files, the control checks the cache for old files on the first time it is loaded by a particular session.

So if the control is never run again, the files will never be deleted. They will also not be deleted if you are using the same SessionID as the files that are supposed to be deleted. This can happen if you leave your browser open for longer than the CacheLifeTime, and the control has not been run by any other sessions in between.

The control checks the .dts (date time stamp) file's time created stamp, and if the present time is past the the file's time stamp + CacheLifeTime, it will delete all files that begin with that SessionID. This also makes it so that you can create your own temporary files, by prepending the SessionID to the filename.

Original Article:

Q10056 - INFO: Why aren't the images in the server cache being displayed?

Details
Last Modified: 7 Months Ago
Last Modified By: Administrator
Type: FAQ
Rated 1 star based on 1 vote
Article has been viewed 165 times.
Options
Also In This Category