refactored caching filesystem adapter