ImageResizer.NET - imagecache 文件夹中的图像太多

ImageResizer.NET - too many images in imagecache folder

我正在使用 ImageResizer.NET(带有磁盘缓存插件)并且它很棒

DiskCache 插件已按照文档所述初始化,具有默认选项:<add name="DiskCache" /> ...没有其他配置,只有默认值

我假设默认值是:subfolders="32"maximumItemsPerFolder="1000"

问题是: - 在每个文件夹中(在 imagecache 文件夹中)我有超过 3000 张图像,而不仅仅是 1000 张,所以我的磁盘 space 不足以处理这个数量的缓存图像

问题是:

  1. 我是不是在默认配置上做错了什么(我假设它应该是 32 个文件夹 x 最多 1000 张图片=最多 32 000 张缓存图片)

  2. 或者,如何限制imagecache中的每个文件夹最多有1000张最后添加的图像

您需要启用缓存清理;通过 default it is disabled.

<diskcache autoClean="true" />

autoClean

When true, will keep a background thread running to 'clean' unused items from the disk cache. This background thread uses smart 'activity sensing' to avoid doing cleanup work when the site is busy. Defaults to false, since the cleanup system is still in beta.