Replaced Guava Cache with a general LinkedHashMap, plus some bookkeeping of cache stats.