12-30-2023, 09:04 PM
(This post was last modified: 12-30-2023, 09:08 PM by Alexandre Machado.)
1- There is no problem using the same root folder as the application cache. IW will create a subfolder which is unique per application. There won't be any conflicts.
2- IW deletes all cache files and folder during shutdown. This has been extensively tested in multiple scenarios. However the deletion of files relies on the normal application shutdown. If the process is terminated externally the cleanup code is bypassed and the files won't be deleted.
Another scenario where cache files deletion may fail is due to AntiVirus software interference. Many cache files contain patterns that look especially interesting to AV software, like JavaScript code. When IntraWeb terminates, it will go through all the existing files trying to delete them. If deletion fails when trying to delete some specific file, it will pause for a few milliseconds and try again. However, if the file is still locked (in our tests, AV software, especially Windows Defender, frequently lock cache files), the process will skip this file and it won't be deleted. We prefer to skip the deletion of some file than to considerably delay the normal termination of the application. Remember that depending on the load, there may be several thousands cache files and waiting for each one even for a couple of seconds can make the termination process take a very long time.
Item (2) above is the reason we recommend to add the IntraWeb cache folder to the antivirus ignore list (most professional AV software has some configuration where you can exclude folders or files from being constant monitored). In general it not only fixes the problem of files not being deleted, but also increases the overall performance of the application.
2- IW deletes all cache files and folder during shutdown. This has been extensively tested in multiple scenarios. However the deletion of files relies on the normal application shutdown. If the process is terminated externally the cleanup code is bypassed and the files won't be deleted.
Another scenario where cache files deletion may fail is due to AntiVirus software interference. Many cache files contain patterns that look especially interesting to AV software, like JavaScript code. When IntraWeb terminates, it will go through all the existing files trying to delete them. If deletion fails when trying to delete some specific file, it will pause for a few milliseconds and try again. However, if the file is still locked (in our tests, AV software, especially Windows Defender, frequently lock cache files), the process will skip this file and it won't be deleted. We prefer to skip the deletion of some file than to considerably delay the normal termination of the application. Remember that depending on the load, there may be several thousands cache files and waiting for each one even for a couple of seconds can make the termination process take a very long time.
Item (2) above is the reason we recommend to add the IntraWeb cache folder to the antivirus ignore list (most professional AV software has some configuration where you can exclude folders or files from being constant monitored). In general it not only fixes the problem of files not being deleted, but also increases the overall performance of the application.

