简体   繁体   中英

ImageResizer autoclean

I am trying to decrease ImageResizer [IR] cache size. IR are behind the CDN and for now it take about 2 days to grow up disk cache to 200Gb. I found that there is autoclean parameter for DiskCache plugin. I enable it on my pre-prod but it did not affect to the cache. I measure count of files after enabling autoclean: Yesteday, 03:53pm files 5944 folders 2153 Yesteday, 07:10pm files 5980 folders 2199 Today, 11:54am files 6382 folders 2674

What's I am doing wrong? Here is my Web.config:

  <resizer> <plugins> <add name="S3Reader2" prefix="~/s3" region="eu-west-1" XXX reducted XXX cacheMetadata="false" checkForModifiedFiles="true" cacheUnmodifiedFiles="true" /> <add name="SimpleFilters" /> <add name="AdvancedFilters" /> <add name="DiskCache" /> <add name="PdfRenderer" downloadNativeDependencies="true" /> </plugins> <diskcache autoclean="true" CleanupStrategy="14400"/> <licenses> <license> ***reducted**** </license> </licenses> </resizer> 

See https://imageresizing.net/docs/v4/plugins/diskcache

The v4 disk cache limits the quantity, not size of files. You can limit the quantity via the subfolders="" setting, which must be a power of two. Roughly 400 files are permitted per subfolder.

<diskcache autoclean="true" subfolders="256"/>

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM