further improvements and fixes to file-based data caching