fix equality of BaseCache
simplify caching tests