Functional implementation for plain and hdfs-heal cache.