Give the cache a minimum size, add logging, and simplify return statement.