ImageResizer diskcache cleanupStrategy

牧云@^-^@ 提交于 2019-12-13 04:24:26

问题


We are using ImageResizer plugin to resize images on the fly along with diskCache plugin for caching.

<diskCache dir="~/imagecache" autoClean="false" hashModifiedDate="true" enabled="true"
  subfolders="32" cacheAccessTimeout="15000" asyncWrites="false" syncBufferSize="10485760" />

<cleanupStrategy startupDelay="00:05" minDelay="00:00:20" maxDelay="00:05" 
    optimalWorkSegmentLength="00:00:04" 
    targetItemsPerFolder="400" maximumItemsPerFolder="1000" 
    avoidRemovalIfCreatedWithin="24:00" avoidRemovalIfUsedWithin="4.00:00" 
    prohibitRemovalIfUsedWithin="00:05" prohibitRemovalIfCreatedWithin="00:10" />

We want to mention the number of images per folder. However the options are available in cleanupStrategy. Right now we do not want to set the clean up stragegy. Can somebody advise how can I set targetItemsPerFolder & maximumItemsPerFolder without clean up stuff?

Thanks in advance..


回答1:


Only use the attributes that you're actually changing.

<cleanupStrategy targetItemsPerFolder="400" maximumItemsPerFolder="1000" />

Better yet, don't mess with carefully tuned defaults at all. Adjust the subfolders count on the diskcache element instead, as recommended everywhere in the documentation.



来源:https://stackoverflow.com/questions/22555699/imageresizer-diskcache-cleanupstrategy

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!