1
Issue with Cache Deletion in IIS
Problem reported by Pavan Chaudhari - 8/17/2023 at 3:47 AM
Resolved
 I wanted to bring to your attention an issue we are facing with cache deletion in IIS. We have recently set the CacheAutoTrimInterval to 5 minutes and the CacheMaxAge to 5 minutes. However, when we publish code into IIS, the cache deletion does not seem to be functioning as expected. 
Strangely, this functionality works perfectly fine on our local machines.

I was wondering if there might be any specific settings in IIS that need to be configured for cache deletion. If there are any guidelines or instructions you can provide to resolve this issue, it would be greatly appreciated. Thank you for your attention to this matter. I look forward to your guidance

Could you please guide us if there are any additional settings or configurations required in IIS to ensure proper cache deletion?
.

version    = DocumentUltimate-v6.9.5.0


Pavan Chaudhari

5 Replies

Reply to Thread
0
Christian Davén Replied
What I have noticed is that the cache trimming never removes the last cached document, but otherwise it works as expected. I don't know if this is related to IIS or not.
0
Pavan Chaudhari Replied
Christian Davén  that I know , cache trimming never remove  the last cached if document are opened in viewer.

we set below setting
<add key="DocumentUltimateWeb:CacheLocation" value="\\Pavan\Publish_webSite\View_scan_doc\App_Data\DocumentCache"/>

locally its trimming cache but  when we publish code into IIS, the cache deletion does not seem to be functioning as expected.

Cem Alacayir kindly Reply asap.
Pavan Chaudhari
0
Cem Alacayir Replied
Employee Post
This happens because when an ASP.NET application is hosted on IIS, it's life is controlled by IIS. For example, IIS can kill/recycle the application pool process when the site is idle.

By default, a web application will not be started until the first user hits your site. Even more, there are some events that will bring your web application down after some time (idle Timeout and different app pool recycling events). In these cases, as the DocumentCache's recurring tasks runs inside the web application, these tasks will not be enqueued, and enqueued jobs will not be processed.

This is particularly true for smaller sites, as there may be long periods of user inactivity. However this can be changed with IIS settings. You can ensure that your web app instance is always running to guarantee the in-time background job processing.

In IIS Manager, right-click on the application pool that is used for your web application and select “Advanced Settings”. Update the following values:

  1. Set start mode to “Always Running”.

    Setting the start mode to “Always Running” tells IIS to start a worker process for your application right away, without waiting for the initial request.

  2. Set Idle Time-Out (minutes) to 0.


References:


0
Pavan Chaudhari Replied
Hi 

Cem Alacayir  we set app pool setting as you mention  before, but we still not get  the cache deletion does not seem to be functioning as expected. 
Could you please guide us if there are any additional settings or configurations required



Pavan Chaudhari
0
Cem Alacayir Replied
Employee Post Marked As Resolution
Please ensure you do all these settings:

  1. Install the Application Initialization Module
    You can install the Application Initialization module via the Server Manager. You can find the module under Server Roles -> Web Server -> Application Developer -> Application Initialization:

  2. Configure the app pool
    In IIS Manager, right click on the application pool under which the application runs and select “Advanced Settings”. Update the following values:

  3. Configure the IIS site
    In IIS Manager, right click on the site for the application, select “Manage Website” -> “Advanced Settings” and set the “Preload Enabled” value to true:

Reference:

Reply to Thread