Add hashing for cached directories.