factored out CacheHelper
preview images in folders