What is thePlatform Temp File Delete Functionality, and how do I enable it?
Solution:
The new delete functionality represents a more efficient way of handling files, with no access denied exceptions in normal circumstances, fewer file downloads from ContentServer, no leaking files in the temp folder, and clean logs.
How does it work?
The platform downloads a file just once and counts how many users are using it. When they reach zero, the file is marked for deletion. Through a predefined time, the platform checks the files marked for deletion and deletes them.
User-defined settings
There is a possibility some of the settings to be modified through web.config (c:\program files (x86)\docuware\web\platform) Firstly, the section has to be defined in configuration/configSections:
1<section name="ReferenceCounterConfig" type="DocuWare.Platform.Implementation.ReferenceCounting.ReferenceCounterConfiguration, DocuWare.PlatformImplementation" />
Then the section has to be added and it has the format:
1<ReferenceCounterConfig intervalToStayAlive="00:10:00" intervalForDeleting="00:05:30" triesToDelete="5" triesToLock="3" intervalBetweenTwoTriesToLock="300">
2 </ReferenceCounterConfig>
There are 5 properties that could be modified:
intervalToStayAlive | Timespan | 00:10:00 | 00:00:30 | Time interval defines how long the file is to stay in the Temp folder and not be deleted. |
intervalForDeleting | Timespan | 00:05:30 | 00:00:30 | Time interval which defines how often the platform will check for files that are not used anymore and they stayed alive more than the time specified by the intervalToStayAlive property |
triesToDelete | Int | 3 | 2 | Defines how many times the platform tries to delete a released file. If the file is locked by another process/user and after the last try the file is not deleted – then the file will stay in a temp folder. |
triesToLock | Int | 3 | 1 | Defines how many additional attempts the platform to try to lock a file. |
intervalBetweenTwoTriesToLock | Int | 200 | 50 | Time interval defines how often the platform tries to lock a file. The interval is in milliseconds. |