functional version for filesystem cache done