add minimize cache directory option

I added a cache for it because imagemin task is too slow.