implemented cache based on folder size