implement hash caching and bypassing of zero-sized files