0

I've configured ARR as a reverse proxy that does output caching. Cache entries have a TTL of 20 minutes, but it seems that cache files remain on disk forever.

TTL is configured in the app's Web.config file under the rewrite rules:

    <rule name="Default ARR cache control" enabled="true">
      <match url=".*" />
      <serverVariables>
        <!-- First arg of value is: 1 to be always active, 0 only if there are no cache headers set. -->
        <set name="ARR_CACHE_CONTROL_OVERRIDE" value="0,max-age=1200" />
      </serverVariables>
    </rule>

In the HTTP responses I can also correctly see this max-age and the cache indeed expires, I get new results served. If I open a cache file it will also include Cache-Control: public, max-age=1200 in its header.

However cache files remain, even if unused. The "Cache clean-up interval" is set to 5 minutes for disk caching, so I'd presume files should only remain there for a maximum of 25 minutes, but there are months-old ones too.

What am I missing, how can I make ARR remove outdated cache files?

Here it's explained how scavenge.exe can be used to clean-up cache files on a secondary drive, but nothing about the primary one. Or should I manually run this utility if I don't one the cache drive to slowly fill up?

1 Answer 1

0

It seems I've misunderstood how these configs should work and "Cache clean-up interval" works together with "Disk usage high threshold".

So maybe files are cleared every 5 minutes, but only if "Disk usage high threshold" is reached? It seems that indeed this is the case, as also elaborated in this blog post: I just configured "Disk usage low threshold" as 4 (percent), "Disk usage high threshold" as 5 and yes, a lot of files were shortly removed.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .